_ide_helper.php 876 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730
  1. <?php
  2. /* @noinspection ALL */
  3. // @formatter:off
  4. // phpcs:ignoreFile
  5. /**
  6. * A helper file for Laravel, to provide autocomplete information to your IDE
  7. * Generated for Laravel 12.20.0.
  8. *
  9. * This file should not be included in your code, only analyzed by your IDE!
  10. *
  11. * @author Barry vd. Heuvel <barryvdh@gmail.com>
  12. * @see https://github.com/barryvdh/laravel-ide-helper
  13. */
  14. namespace Illuminate\Support\Facades {
  15. /**
  16. * @see \Illuminate\Foundation\Application
  17. */
  18. class App {
  19. /**
  20. * Begin configuring a new Laravel application instance.
  21. *
  22. * @param string|null $basePath
  23. * @return \Illuminate\Foundation\Configuration\ApplicationBuilder
  24. * @static
  25. */
  26. public static function configure($basePath = null)
  27. {
  28. return \Illuminate\Foundation\Application::configure($basePath);
  29. }
  30. /**
  31. * Infer the application's base directory from the environment.
  32. *
  33. * @return string
  34. * @static
  35. */
  36. public static function inferBasePath()
  37. {
  38. return \Illuminate\Foundation\Application::inferBasePath();
  39. }
  40. /**
  41. * Get the version number of the application.
  42. *
  43. * @return string
  44. * @static
  45. */
  46. public static function version()
  47. {
  48. /** @var \Illuminate\Foundation\Application $instance */
  49. return $instance->version();
  50. }
  51. /**
  52. * Run the given array of bootstrap classes.
  53. *
  54. * @param string[] $bootstrappers
  55. * @return void
  56. * @static
  57. */
  58. public static function bootstrapWith($bootstrappers)
  59. {
  60. /** @var \Illuminate\Foundation\Application $instance */
  61. $instance->bootstrapWith($bootstrappers);
  62. }
  63. /**
  64. * Register a callback to run after loading the environment.
  65. *
  66. * @param \Closure $callback
  67. * @return void
  68. * @static
  69. */
  70. public static function afterLoadingEnvironment($callback)
  71. {
  72. /** @var \Illuminate\Foundation\Application $instance */
  73. $instance->afterLoadingEnvironment($callback);
  74. }
  75. /**
  76. * Register a callback to run before a bootstrapper.
  77. *
  78. * @param string $bootstrapper
  79. * @param \Closure $callback
  80. * @return void
  81. * @static
  82. */
  83. public static function beforeBootstrapping($bootstrapper, $callback)
  84. {
  85. /** @var \Illuminate\Foundation\Application $instance */
  86. $instance->beforeBootstrapping($bootstrapper, $callback);
  87. }
  88. /**
  89. * Register a callback to run after a bootstrapper.
  90. *
  91. * @param string $bootstrapper
  92. * @param \Closure $callback
  93. * @return void
  94. * @static
  95. */
  96. public static function afterBootstrapping($bootstrapper, $callback)
  97. {
  98. /** @var \Illuminate\Foundation\Application $instance */
  99. $instance->afterBootstrapping($bootstrapper, $callback);
  100. }
  101. /**
  102. * Determine if the application has been bootstrapped before.
  103. *
  104. * @return bool
  105. * @static
  106. */
  107. public static function hasBeenBootstrapped()
  108. {
  109. /** @var \Illuminate\Foundation\Application $instance */
  110. return $instance->hasBeenBootstrapped();
  111. }
  112. /**
  113. * Set the base path for the application.
  114. *
  115. * @param string $basePath
  116. * @return \Illuminate\Foundation\Application
  117. * @static
  118. */
  119. public static function setBasePath($basePath)
  120. {
  121. /** @var \Illuminate\Foundation\Application $instance */
  122. return $instance->setBasePath($basePath);
  123. }
  124. /**
  125. * Get the path to the application "app" directory.
  126. *
  127. * @param string $path
  128. * @return string
  129. * @static
  130. */
  131. public static function path($path = '')
  132. {
  133. /** @var \Illuminate\Foundation\Application $instance */
  134. return $instance->path($path);
  135. }
  136. /**
  137. * Set the application directory.
  138. *
  139. * @param string $path
  140. * @return \Illuminate\Foundation\Application
  141. * @static
  142. */
  143. public static function useAppPath($path)
  144. {
  145. /** @var \Illuminate\Foundation\Application $instance */
  146. return $instance->useAppPath($path);
  147. }
  148. /**
  149. * Get the base path of the Laravel installation.
  150. *
  151. * @param string $path
  152. * @return string
  153. * @static
  154. */
  155. public static function basePath($path = '')
  156. {
  157. /** @var \Illuminate\Foundation\Application $instance */
  158. return $instance->basePath($path);
  159. }
  160. /**
  161. * Get the path to the bootstrap directory.
  162. *
  163. * @param string $path
  164. * @return string
  165. * @static
  166. */
  167. public static function bootstrapPath($path = '')
  168. {
  169. /** @var \Illuminate\Foundation\Application $instance */
  170. return $instance->bootstrapPath($path);
  171. }
  172. /**
  173. * Get the path to the service provider list in the bootstrap directory.
  174. *
  175. * @return string
  176. * @static
  177. */
  178. public static function getBootstrapProvidersPath()
  179. {
  180. /** @var \Illuminate\Foundation\Application $instance */
  181. return $instance->getBootstrapProvidersPath();
  182. }
  183. /**
  184. * Set the bootstrap file directory.
  185. *
  186. * @param string $path
  187. * @return \Illuminate\Foundation\Application
  188. * @static
  189. */
  190. public static function useBootstrapPath($path)
  191. {
  192. /** @var \Illuminate\Foundation\Application $instance */
  193. return $instance->useBootstrapPath($path);
  194. }
  195. /**
  196. * Get the path to the application configuration files.
  197. *
  198. * @param string $path
  199. * @return string
  200. * @static
  201. */
  202. public static function configPath($path = '')
  203. {
  204. /** @var \Illuminate\Foundation\Application $instance */
  205. return $instance->configPath($path);
  206. }
  207. /**
  208. * Set the configuration directory.
  209. *
  210. * @param string $path
  211. * @return \Illuminate\Foundation\Application
  212. * @static
  213. */
  214. public static function useConfigPath($path)
  215. {
  216. /** @var \Illuminate\Foundation\Application $instance */
  217. return $instance->useConfigPath($path);
  218. }
  219. /**
  220. * Get the path to the database directory.
  221. *
  222. * @param string $path
  223. * @return string
  224. * @static
  225. */
  226. public static function databasePath($path = '')
  227. {
  228. /** @var \Illuminate\Foundation\Application $instance */
  229. return $instance->databasePath($path);
  230. }
  231. /**
  232. * Set the database directory.
  233. *
  234. * @param string $path
  235. * @return \Illuminate\Foundation\Application
  236. * @static
  237. */
  238. public static function useDatabasePath($path)
  239. {
  240. /** @var \Illuminate\Foundation\Application $instance */
  241. return $instance->useDatabasePath($path);
  242. }
  243. /**
  244. * Get the path to the language files.
  245. *
  246. * @param string $path
  247. * @return string
  248. * @static
  249. */
  250. public static function langPath($path = '')
  251. {
  252. /** @var \Illuminate\Foundation\Application $instance */
  253. return $instance->langPath($path);
  254. }
  255. /**
  256. * Set the language file directory.
  257. *
  258. * @param string $path
  259. * @return \Illuminate\Foundation\Application
  260. * @static
  261. */
  262. public static function useLangPath($path)
  263. {
  264. /** @var \Illuminate\Foundation\Application $instance */
  265. return $instance->useLangPath($path);
  266. }
  267. /**
  268. * Get the path to the public / web directory.
  269. *
  270. * @param string $path
  271. * @return string
  272. * @static
  273. */
  274. public static function publicPath($path = '')
  275. {
  276. /** @var \Illuminate\Foundation\Application $instance */
  277. return $instance->publicPath($path);
  278. }
  279. /**
  280. * Set the public / web directory.
  281. *
  282. * @param string $path
  283. * @return \Illuminate\Foundation\Application
  284. * @static
  285. */
  286. public static function usePublicPath($path)
  287. {
  288. /** @var \Illuminate\Foundation\Application $instance */
  289. return $instance->usePublicPath($path);
  290. }
  291. /**
  292. * Get the path to the storage directory.
  293. *
  294. * @param string $path
  295. * @return string
  296. * @static
  297. */
  298. public static function storagePath($path = '')
  299. {
  300. /** @var \Illuminate\Foundation\Application $instance */
  301. return $instance->storagePath($path);
  302. }
  303. /**
  304. * Set the storage directory.
  305. *
  306. * @param string $path
  307. * @return \Illuminate\Foundation\Application
  308. * @static
  309. */
  310. public static function useStoragePath($path)
  311. {
  312. /** @var \Illuminate\Foundation\Application $instance */
  313. return $instance->useStoragePath($path);
  314. }
  315. /**
  316. * Get the path to the resources directory.
  317. *
  318. * @param string $path
  319. * @return string
  320. * @static
  321. */
  322. public static function resourcePath($path = '')
  323. {
  324. /** @var \Illuminate\Foundation\Application $instance */
  325. return $instance->resourcePath($path);
  326. }
  327. /**
  328. * Get the path to the views directory.
  329. *
  330. * This method returns the first configured path in the array of view paths.
  331. *
  332. * @param string $path
  333. * @return string
  334. * @static
  335. */
  336. public static function viewPath($path = '')
  337. {
  338. /** @var \Illuminate\Foundation\Application $instance */
  339. return $instance->viewPath($path);
  340. }
  341. /**
  342. * Join the given paths together.
  343. *
  344. * @param string $basePath
  345. * @param string $path
  346. * @return string
  347. * @static
  348. */
  349. public static function joinPaths($basePath, $path = '')
  350. {
  351. /** @var \Illuminate\Foundation\Application $instance */
  352. return $instance->joinPaths($basePath, $path);
  353. }
  354. /**
  355. * Get the path to the environment file directory.
  356. *
  357. * @return string
  358. * @static
  359. */
  360. public static function environmentPath()
  361. {
  362. /** @var \Illuminate\Foundation\Application $instance */
  363. return $instance->environmentPath();
  364. }
  365. /**
  366. * Set the directory for the environment file.
  367. *
  368. * @param string $path
  369. * @return \Illuminate\Foundation\Application
  370. * @static
  371. */
  372. public static function useEnvironmentPath($path)
  373. {
  374. /** @var \Illuminate\Foundation\Application $instance */
  375. return $instance->useEnvironmentPath($path);
  376. }
  377. /**
  378. * Set the environment file to be loaded during bootstrapping.
  379. *
  380. * @param string $file
  381. * @return \Illuminate\Foundation\Application
  382. * @static
  383. */
  384. public static function loadEnvironmentFrom($file)
  385. {
  386. /** @var \Illuminate\Foundation\Application $instance */
  387. return $instance->loadEnvironmentFrom($file);
  388. }
  389. /**
  390. * Get the environment file the application is using.
  391. *
  392. * @return string
  393. * @static
  394. */
  395. public static function environmentFile()
  396. {
  397. /** @var \Illuminate\Foundation\Application $instance */
  398. return $instance->environmentFile();
  399. }
  400. /**
  401. * Get the fully qualified path to the environment file.
  402. *
  403. * @return string
  404. * @static
  405. */
  406. public static function environmentFilePath()
  407. {
  408. /** @var \Illuminate\Foundation\Application $instance */
  409. return $instance->environmentFilePath();
  410. }
  411. /**
  412. * Get or check the current application environment.
  413. *
  414. * @param string|array $environments
  415. * @return string|bool
  416. * @static
  417. */
  418. public static function environment(...$environments)
  419. {
  420. /** @var \Illuminate\Foundation\Application $instance */
  421. return $instance->environment(...$environments);
  422. }
  423. /**
  424. * Determine if the application is in the local environment.
  425. *
  426. * @return bool
  427. * @static
  428. */
  429. public static function isLocal()
  430. {
  431. /** @var \Illuminate\Foundation\Application $instance */
  432. return $instance->isLocal();
  433. }
  434. /**
  435. * Determine if the application is in the production environment.
  436. *
  437. * @return bool
  438. * @static
  439. */
  440. public static function isProduction()
  441. {
  442. /** @var \Illuminate\Foundation\Application $instance */
  443. return $instance->isProduction();
  444. }
  445. /**
  446. * Detect the application's current environment.
  447. *
  448. * @param \Closure $callback
  449. * @return string
  450. * @static
  451. */
  452. public static function detectEnvironment($callback)
  453. {
  454. /** @var \Illuminate\Foundation\Application $instance */
  455. return $instance->detectEnvironment($callback);
  456. }
  457. /**
  458. * Determine if the application is running in the console.
  459. *
  460. * @return bool
  461. * @static
  462. */
  463. public static function runningInConsole()
  464. {
  465. /** @var \Illuminate\Foundation\Application $instance */
  466. return $instance->runningInConsole();
  467. }
  468. /**
  469. * Determine if the application is running any of the given console commands.
  470. *
  471. * @param string|array $commands
  472. * @return bool
  473. * @static
  474. */
  475. public static function runningConsoleCommand(...$commands)
  476. {
  477. /** @var \Illuminate\Foundation\Application $instance */
  478. return $instance->runningConsoleCommand(...$commands);
  479. }
  480. /**
  481. * Determine if the application is running unit tests.
  482. *
  483. * @return bool
  484. * @static
  485. */
  486. public static function runningUnitTests()
  487. {
  488. /** @var \Illuminate\Foundation\Application $instance */
  489. return $instance->runningUnitTests();
  490. }
  491. /**
  492. * Determine if the application is running with debug mode enabled.
  493. *
  494. * @return bool
  495. * @static
  496. */
  497. public static function hasDebugModeEnabled()
  498. {
  499. /** @var \Illuminate\Foundation\Application $instance */
  500. return $instance->hasDebugModeEnabled();
  501. }
  502. /**
  503. * Register a new registered listener.
  504. *
  505. * @param callable $callback
  506. * @return void
  507. * @static
  508. */
  509. public static function registered($callback)
  510. {
  511. /** @var \Illuminate\Foundation\Application $instance */
  512. $instance->registered($callback);
  513. }
  514. /**
  515. * Register all of the configured providers.
  516. *
  517. * @return void
  518. * @static
  519. */
  520. public static function registerConfiguredProviders()
  521. {
  522. /** @var \Illuminate\Foundation\Application $instance */
  523. $instance->registerConfiguredProviders();
  524. }
  525. /**
  526. * Register a service provider with the application.
  527. *
  528. * @param \Illuminate\Support\ServiceProvider|string $provider
  529. * @param bool $force
  530. * @return \Illuminate\Support\ServiceProvider
  531. * @static
  532. */
  533. public static function register($provider, $force = false)
  534. {
  535. /** @var \Illuminate\Foundation\Application $instance */
  536. return $instance->register($provider, $force);
  537. }
  538. /**
  539. * Get the registered service provider instance if it exists.
  540. *
  541. * @param \Illuminate\Support\ServiceProvider|string $provider
  542. * @return \Illuminate\Support\ServiceProvider|null
  543. * @static
  544. */
  545. public static function getProvider($provider)
  546. {
  547. /** @var \Illuminate\Foundation\Application $instance */
  548. return $instance->getProvider($provider);
  549. }
  550. /**
  551. * Get the registered service provider instances if any exist.
  552. *
  553. * @param \Illuminate\Support\ServiceProvider|string $provider
  554. * @return array
  555. * @static
  556. */
  557. public static function getProviders($provider)
  558. {
  559. /** @var \Illuminate\Foundation\Application $instance */
  560. return $instance->getProviders($provider);
  561. }
  562. /**
  563. * Resolve a service provider instance from the class name.
  564. *
  565. * @param string $provider
  566. * @return \Illuminate\Support\ServiceProvider
  567. * @static
  568. */
  569. public static function resolveProvider($provider)
  570. {
  571. /** @var \Illuminate\Foundation\Application $instance */
  572. return $instance->resolveProvider($provider);
  573. }
  574. /**
  575. * Load and boot all of the remaining deferred providers.
  576. *
  577. * @return void
  578. * @static
  579. */
  580. public static function loadDeferredProviders()
  581. {
  582. /** @var \Illuminate\Foundation\Application $instance */
  583. $instance->loadDeferredProviders();
  584. }
  585. /**
  586. * Load the provider for a deferred service.
  587. *
  588. * @param string $service
  589. * @return void
  590. * @static
  591. */
  592. public static function loadDeferredProvider($service)
  593. {
  594. /** @var \Illuminate\Foundation\Application $instance */
  595. $instance->loadDeferredProvider($service);
  596. }
  597. /**
  598. * Register a deferred provider and service.
  599. *
  600. * @param string $provider
  601. * @param string|null $service
  602. * @return void
  603. * @static
  604. */
  605. public static function registerDeferredProvider($provider, $service = null)
  606. {
  607. /** @var \Illuminate\Foundation\Application $instance */
  608. $instance->registerDeferredProvider($provider, $service);
  609. }
  610. /**
  611. * Resolve the given type from the container.
  612. *
  613. * @template TClass of object
  614. * @param string|class-string<TClass> $abstract
  615. * @param array $parameters
  616. * @return ($abstract is class-string<TClass> ? TClass : mixed)
  617. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  618. * @static
  619. */
  620. public static function make($abstract, $parameters = [])
  621. {
  622. /** @var \Illuminate\Foundation\Application $instance */
  623. return $instance->make($abstract, $parameters);
  624. }
  625. /**
  626. * Determine if the given abstract type has been bound.
  627. *
  628. * @param string $abstract
  629. * @return bool
  630. * @static
  631. */
  632. public static function bound($abstract)
  633. {
  634. /** @var \Illuminate\Foundation\Application $instance */
  635. return $instance->bound($abstract);
  636. }
  637. /**
  638. * Determine if the application has booted.
  639. *
  640. * @return bool
  641. * @static
  642. */
  643. public static function isBooted()
  644. {
  645. /** @var \Illuminate\Foundation\Application $instance */
  646. return $instance->isBooted();
  647. }
  648. /**
  649. * Boot the application's service providers.
  650. *
  651. * @return void
  652. * @static
  653. */
  654. public static function boot()
  655. {
  656. /** @var \Illuminate\Foundation\Application $instance */
  657. $instance->boot();
  658. }
  659. /**
  660. * Register a new boot listener.
  661. *
  662. * @param callable $callback
  663. * @return void
  664. * @static
  665. */
  666. public static function booting($callback)
  667. {
  668. /** @var \Illuminate\Foundation\Application $instance */
  669. $instance->booting($callback);
  670. }
  671. /**
  672. * Register a new "booted" listener.
  673. *
  674. * @param callable $callback
  675. * @return void
  676. * @static
  677. */
  678. public static function booted($callback)
  679. {
  680. /** @var \Illuminate\Foundation\Application $instance */
  681. $instance->booted($callback);
  682. }
  683. /**
  684. * {@inheritdoc}
  685. *
  686. * @return \Symfony\Component\HttpFoundation\Response
  687. * @static
  688. */
  689. public static function handle($request, $type = 1, $catch = true)
  690. {
  691. /** @var \Illuminate\Foundation\Application $instance */
  692. return $instance->handle($request, $type, $catch);
  693. }
  694. /**
  695. * Handle the incoming HTTP request and send the response to the browser.
  696. *
  697. * @param \Illuminate\Http\Request $request
  698. * @return void
  699. * @static
  700. */
  701. public static function handleRequest($request)
  702. {
  703. /** @var \Illuminate\Foundation\Application $instance */
  704. $instance->handleRequest($request);
  705. }
  706. /**
  707. * Handle the incoming Artisan command.
  708. *
  709. * @param \Symfony\Component\Console\Input\InputInterface $input
  710. * @return int
  711. * @static
  712. */
  713. public static function handleCommand($input)
  714. {
  715. /** @var \Illuminate\Foundation\Application $instance */
  716. return $instance->handleCommand($input);
  717. }
  718. /**
  719. * Determine if the framework's base configuration should be merged.
  720. *
  721. * @return bool
  722. * @static
  723. */
  724. public static function shouldMergeFrameworkConfiguration()
  725. {
  726. /** @var \Illuminate\Foundation\Application $instance */
  727. return $instance->shouldMergeFrameworkConfiguration();
  728. }
  729. /**
  730. * Indicate that the framework's base configuration should not be merged.
  731. *
  732. * @return \Illuminate\Foundation\Application
  733. * @static
  734. */
  735. public static function dontMergeFrameworkConfiguration()
  736. {
  737. /** @var \Illuminate\Foundation\Application $instance */
  738. return $instance->dontMergeFrameworkConfiguration();
  739. }
  740. /**
  741. * Determine if middleware has been disabled for the application.
  742. *
  743. * @return bool
  744. * @static
  745. */
  746. public static function shouldSkipMiddleware()
  747. {
  748. /** @var \Illuminate\Foundation\Application $instance */
  749. return $instance->shouldSkipMiddleware();
  750. }
  751. /**
  752. * Get the path to the cached services.php file.
  753. *
  754. * @return string
  755. * @static
  756. */
  757. public static function getCachedServicesPath()
  758. {
  759. /** @var \Illuminate\Foundation\Application $instance */
  760. return $instance->getCachedServicesPath();
  761. }
  762. /**
  763. * Get the path to the cached packages.php file.
  764. *
  765. * @return string
  766. * @static
  767. */
  768. public static function getCachedPackagesPath()
  769. {
  770. /** @var \Illuminate\Foundation\Application $instance */
  771. return $instance->getCachedPackagesPath();
  772. }
  773. /**
  774. * Determine if the application configuration is cached.
  775. *
  776. * @return bool
  777. * @static
  778. */
  779. public static function configurationIsCached()
  780. {
  781. /** @var \Illuminate\Foundation\Application $instance */
  782. return $instance->configurationIsCached();
  783. }
  784. /**
  785. * Get the path to the configuration cache file.
  786. *
  787. * @return string
  788. * @static
  789. */
  790. public static function getCachedConfigPath()
  791. {
  792. /** @var \Illuminate\Foundation\Application $instance */
  793. return $instance->getCachedConfigPath();
  794. }
  795. /**
  796. * Determine if the application routes are cached.
  797. *
  798. * @return bool
  799. * @static
  800. */
  801. public static function routesAreCached()
  802. {
  803. /** @var \Illuminate\Foundation\Application $instance */
  804. return $instance->routesAreCached();
  805. }
  806. /**
  807. * Get the path to the routes cache file.
  808. *
  809. * @return string
  810. * @static
  811. */
  812. public static function getCachedRoutesPath()
  813. {
  814. /** @var \Illuminate\Foundation\Application $instance */
  815. return $instance->getCachedRoutesPath();
  816. }
  817. /**
  818. * Determine if the application events are cached.
  819. *
  820. * @return bool
  821. * @static
  822. */
  823. public static function eventsAreCached()
  824. {
  825. /** @var \Illuminate\Foundation\Application $instance */
  826. return $instance->eventsAreCached();
  827. }
  828. /**
  829. * Get the path to the events cache file.
  830. *
  831. * @return string
  832. * @static
  833. */
  834. public static function getCachedEventsPath()
  835. {
  836. /** @var \Illuminate\Foundation\Application $instance */
  837. return $instance->getCachedEventsPath();
  838. }
  839. /**
  840. * Add new prefix to list of absolute path prefixes.
  841. *
  842. * @param string $prefix
  843. * @return \Illuminate\Foundation\Application
  844. * @static
  845. */
  846. public static function addAbsoluteCachePathPrefix($prefix)
  847. {
  848. /** @var \Illuminate\Foundation\Application $instance */
  849. return $instance->addAbsoluteCachePathPrefix($prefix);
  850. }
  851. /**
  852. * Get an instance of the maintenance mode manager implementation.
  853. *
  854. * @return \Illuminate\Contracts\Foundation\MaintenanceMode
  855. * @static
  856. */
  857. public static function maintenanceMode()
  858. {
  859. /** @var \Illuminate\Foundation\Application $instance */
  860. return $instance->maintenanceMode();
  861. }
  862. /**
  863. * Determine if the application is currently down for maintenance.
  864. *
  865. * @return bool
  866. * @static
  867. */
  868. public static function isDownForMaintenance()
  869. {
  870. /** @var \Illuminate\Foundation\Application $instance */
  871. return $instance->isDownForMaintenance();
  872. }
  873. /**
  874. * Throw an HttpException with the given data.
  875. *
  876. * @param int $code
  877. * @param string $message
  878. * @param array $headers
  879. * @return never
  880. * @throws \Symfony\Component\HttpKernel\Exception\HttpException
  881. * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  882. * @static
  883. */
  884. public static function abort($code, $message = '', $headers = [])
  885. {
  886. /** @var \Illuminate\Foundation\Application $instance */
  887. return $instance->abort($code, $message, $headers);
  888. }
  889. /**
  890. * Register a terminating callback with the application.
  891. *
  892. * @param callable|string $callback
  893. * @return \Illuminate\Foundation\Application
  894. * @static
  895. */
  896. public static function terminating($callback)
  897. {
  898. /** @var \Illuminate\Foundation\Application $instance */
  899. return $instance->terminating($callback);
  900. }
  901. /**
  902. * Terminate the application.
  903. *
  904. * @return void
  905. * @static
  906. */
  907. public static function terminate()
  908. {
  909. /** @var \Illuminate\Foundation\Application $instance */
  910. $instance->terminate();
  911. }
  912. /**
  913. * Get the service providers that have been loaded.
  914. *
  915. * @return array<string, bool>
  916. * @static
  917. */
  918. public static function getLoadedProviders()
  919. {
  920. /** @var \Illuminate\Foundation\Application $instance */
  921. return $instance->getLoadedProviders();
  922. }
  923. /**
  924. * Determine if the given service provider is loaded.
  925. *
  926. * @param string $provider
  927. * @return bool
  928. * @static
  929. */
  930. public static function providerIsLoaded($provider)
  931. {
  932. /** @var \Illuminate\Foundation\Application $instance */
  933. return $instance->providerIsLoaded($provider);
  934. }
  935. /**
  936. * Get the application's deferred services.
  937. *
  938. * @return array
  939. * @static
  940. */
  941. public static function getDeferredServices()
  942. {
  943. /** @var \Illuminate\Foundation\Application $instance */
  944. return $instance->getDeferredServices();
  945. }
  946. /**
  947. * Set the application's deferred services.
  948. *
  949. * @param array $services
  950. * @return void
  951. * @static
  952. */
  953. public static function setDeferredServices($services)
  954. {
  955. /** @var \Illuminate\Foundation\Application $instance */
  956. $instance->setDeferredServices($services);
  957. }
  958. /**
  959. * Determine if the given service is a deferred service.
  960. *
  961. * @param string $service
  962. * @return bool
  963. * @static
  964. */
  965. public static function isDeferredService($service)
  966. {
  967. /** @var \Illuminate\Foundation\Application $instance */
  968. return $instance->isDeferredService($service);
  969. }
  970. /**
  971. * Add an array of services to the application's deferred services.
  972. *
  973. * @param array $services
  974. * @return void
  975. * @static
  976. */
  977. public static function addDeferredServices($services)
  978. {
  979. /** @var \Illuminate\Foundation\Application $instance */
  980. $instance->addDeferredServices($services);
  981. }
  982. /**
  983. * Remove an array of services from the application's deferred services.
  984. *
  985. * @param array $services
  986. * @return void
  987. * @static
  988. */
  989. public static function removeDeferredServices($services)
  990. {
  991. /** @var \Illuminate\Foundation\Application $instance */
  992. $instance->removeDeferredServices($services);
  993. }
  994. /**
  995. * Configure the real-time facade namespace.
  996. *
  997. * @param string $namespace
  998. * @return void
  999. * @static
  1000. */
  1001. public static function provideFacades($namespace)
  1002. {
  1003. /** @var \Illuminate\Foundation\Application $instance */
  1004. $instance->provideFacades($namespace);
  1005. }
  1006. /**
  1007. * Get the current application locale.
  1008. *
  1009. * @return string
  1010. * @static
  1011. */
  1012. public static function getLocale()
  1013. {
  1014. /** @var \Illuminate\Foundation\Application $instance */
  1015. return $instance->getLocale();
  1016. }
  1017. /**
  1018. * Get the current application locale.
  1019. *
  1020. * @return string
  1021. * @static
  1022. */
  1023. public static function currentLocale()
  1024. {
  1025. /** @var \Illuminate\Foundation\Application $instance */
  1026. return $instance->currentLocale();
  1027. }
  1028. /**
  1029. * Get the current application fallback locale.
  1030. *
  1031. * @return string
  1032. * @static
  1033. */
  1034. public static function getFallbackLocale()
  1035. {
  1036. /** @var \Illuminate\Foundation\Application $instance */
  1037. return $instance->getFallbackLocale();
  1038. }
  1039. /**
  1040. * Set the current application locale.
  1041. *
  1042. * @param string $locale
  1043. * @return void
  1044. * @static
  1045. */
  1046. public static function setLocale($locale)
  1047. {
  1048. /** @var \Illuminate\Foundation\Application $instance */
  1049. $instance->setLocale($locale);
  1050. }
  1051. /**
  1052. * Set the current application fallback locale.
  1053. *
  1054. * @param string $fallbackLocale
  1055. * @return void
  1056. * @static
  1057. */
  1058. public static function setFallbackLocale($fallbackLocale)
  1059. {
  1060. /** @var \Illuminate\Foundation\Application $instance */
  1061. $instance->setFallbackLocale($fallbackLocale);
  1062. }
  1063. /**
  1064. * Determine if the application locale is the given locale.
  1065. *
  1066. * @param string $locale
  1067. * @return bool
  1068. * @static
  1069. */
  1070. public static function isLocale($locale)
  1071. {
  1072. /** @var \Illuminate\Foundation\Application $instance */
  1073. return $instance->isLocale($locale);
  1074. }
  1075. /**
  1076. * Register the core class aliases in the container.
  1077. *
  1078. * @return void
  1079. * @static
  1080. */
  1081. public static function registerCoreContainerAliases()
  1082. {
  1083. /** @var \Illuminate\Foundation\Application $instance */
  1084. $instance->registerCoreContainerAliases();
  1085. }
  1086. /**
  1087. * Flush the container of all bindings and resolved instances.
  1088. *
  1089. * @return void
  1090. * @static
  1091. */
  1092. public static function flush()
  1093. {
  1094. /** @var \Illuminate\Foundation\Application $instance */
  1095. $instance->flush();
  1096. }
  1097. /**
  1098. * Get the application namespace.
  1099. *
  1100. * @return string
  1101. * @throws \RuntimeException
  1102. * @static
  1103. */
  1104. public static function getNamespace()
  1105. {
  1106. /** @var \Illuminate\Foundation\Application $instance */
  1107. return $instance->getNamespace();
  1108. }
  1109. /**
  1110. * Define a contextual binding.
  1111. *
  1112. * @param array|string $concrete
  1113. * @return \Illuminate\Contracts\Container\ContextualBindingBuilder
  1114. * @static
  1115. */
  1116. public static function when($concrete)
  1117. {
  1118. //Method inherited from \Illuminate\Container\Container
  1119. /** @var \Illuminate\Foundation\Application $instance */
  1120. return $instance->when($concrete);
  1121. }
  1122. /**
  1123. * Define a contextual binding based on an attribute.
  1124. *
  1125. * @param string $attribute
  1126. * @param \Closure $handler
  1127. * @return void
  1128. * @static
  1129. */
  1130. public static function whenHasAttribute($attribute, $handler)
  1131. {
  1132. //Method inherited from \Illuminate\Container\Container
  1133. /** @var \Illuminate\Foundation\Application $instance */
  1134. $instance->whenHasAttribute($attribute, $handler);
  1135. }
  1136. /**
  1137. * Returns true if the container can return an entry for the given identifier.
  1138. *
  1139. * Returns false otherwise.
  1140. *
  1141. * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
  1142. * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.
  1143. *
  1144. * @return bool
  1145. * @param string $id Identifier of the entry to look for.
  1146. * @return bool
  1147. * @static
  1148. */
  1149. public static function has($id)
  1150. {
  1151. //Method inherited from \Illuminate\Container\Container
  1152. /** @var \Illuminate\Foundation\Application $instance */
  1153. return $instance->has($id);
  1154. }
  1155. /**
  1156. * Determine if the given abstract type has been resolved.
  1157. *
  1158. * @param string $abstract
  1159. * @return bool
  1160. * @static
  1161. */
  1162. public static function resolved($abstract)
  1163. {
  1164. //Method inherited from \Illuminate\Container\Container
  1165. /** @var \Illuminate\Foundation\Application $instance */
  1166. return $instance->resolved($abstract);
  1167. }
  1168. /**
  1169. * Determine if a given type is shared.
  1170. *
  1171. * @param string $abstract
  1172. * @return bool
  1173. * @static
  1174. */
  1175. public static function isShared($abstract)
  1176. {
  1177. //Method inherited from \Illuminate\Container\Container
  1178. /** @var \Illuminate\Foundation\Application $instance */
  1179. return $instance->isShared($abstract);
  1180. }
  1181. /**
  1182. * Determine if a given string is an alias.
  1183. *
  1184. * @param string $name
  1185. * @return bool
  1186. * @static
  1187. */
  1188. public static function isAlias($name)
  1189. {
  1190. //Method inherited from \Illuminate\Container\Container
  1191. /** @var \Illuminate\Foundation\Application $instance */
  1192. return $instance->isAlias($name);
  1193. }
  1194. /**
  1195. * Register a binding with the container.
  1196. *
  1197. * @param \Closure|string $abstract
  1198. * @param \Closure|string|null $concrete
  1199. * @param bool $shared
  1200. * @return void
  1201. * @throws \TypeError
  1202. * @throws ReflectionException
  1203. * @static
  1204. */
  1205. public static function bind($abstract, $concrete = null, $shared = false)
  1206. {
  1207. //Method inherited from \Illuminate\Container\Container
  1208. /** @var \Illuminate\Foundation\Application $instance */
  1209. $instance->bind($abstract, $concrete, $shared);
  1210. }
  1211. /**
  1212. * Determine if the container has a method binding.
  1213. *
  1214. * @param string $method
  1215. * @return bool
  1216. * @static
  1217. */
  1218. public static function hasMethodBinding($method)
  1219. {
  1220. //Method inherited from \Illuminate\Container\Container
  1221. /** @var \Illuminate\Foundation\Application $instance */
  1222. return $instance->hasMethodBinding($method);
  1223. }
  1224. /**
  1225. * Bind a callback to resolve with Container::call.
  1226. *
  1227. * @param array|string $method
  1228. * @param \Closure $callback
  1229. * @return void
  1230. * @static
  1231. */
  1232. public static function bindMethod($method, $callback)
  1233. {
  1234. //Method inherited from \Illuminate\Container\Container
  1235. /** @var \Illuminate\Foundation\Application $instance */
  1236. $instance->bindMethod($method, $callback);
  1237. }
  1238. /**
  1239. * Get the method binding for the given method.
  1240. *
  1241. * @param string $method
  1242. * @param mixed $instance
  1243. * @return mixed
  1244. * @static
  1245. */
  1246. public static function callMethodBinding($method, $instance)
  1247. {
  1248. //Method inherited from \Illuminate\Container\Container
  1249. /** @var \Illuminate\Foundation\Application $instance */
  1250. return $instance->callMethodBinding($method, $instance);
  1251. }
  1252. /**
  1253. * Add a contextual binding to the container.
  1254. *
  1255. * @param string $concrete
  1256. * @param \Closure|string $abstract
  1257. * @param \Closure|string $implementation
  1258. * @return void
  1259. * @static
  1260. */
  1261. public static function addContextualBinding($concrete, $abstract, $implementation)
  1262. {
  1263. //Method inherited from \Illuminate\Container\Container
  1264. /** @var \Illuminate\Foundation\Application $instance */
  1265. $instance->addContextualBinding($concrete, $abstract, $implementation);
  1266. }
  1267. /**
  1268. * Register a binding if it hasn't already been registered.
  1269. *
  1270. * @param \Closure|string $abstract
  1271. * @param \Closure|string|null $concrete
  1272. * @param bool $shared
  1273. * @return void
  1274. * @static
  1275. */
  1276. public static function bindIf($abstract, $concrete = null, $shared = false)
  1277. {
  1278. //Method inherited from \Illuminate\Container\Container
  1279. /** @var \Illuminate\Foundation\Application $instance */
  1280. $instance->bindIf($abstract, $concrete, $shared);
  1281. }
  1282. /**
  1283. * Register a shared binding in the container.
  1284. *
  1285. * @param \Closure|string $abstract
  1286. * @param \Closure|string|null $concrete
  1287. * @return void
  1288. * @static
  1289. */
  1290. public static function singleton($abstract, $concrete = null)
  1291. {
  1292. //Method inherited from \Illuminate\Container\Container
  1293. /** @var \Illuminate\Foundation\Application $instance */
  1294. $instance->singleton($abstract, $concrete);
  1295. }
  1296. /**
  1297. * Register a shared binding if it hasn't already been registered.
  1298. *
  1299. * @param \Closure|string $abstract
  1300. * @param \Closure|string|null $concrete
  1301. * @return void
  1302. * @static
  1303. */
  1304. public static function singletonIf($abstract, $concrete = null)
  1305. {
  1306. //Method inherited from \Illuminate\Container\Container
  1307. /** @var \Illuminate\Foundation\Application $instance */
  1308. $instance->singletonIf($abstract, $concrete);
  1309. }
  1310. /**
  1311. * Register a scoped binding in the container.
  1312. *
  1313. * @param \Closure|string $abstract
  1314. * @param \Closure|string|null $concrete
  1315. * @return void
  1316. * @static
  1317. */
  1318. public static function scoped($abstract, $concrete = null)
  1319. {
  1320. //Method inherited from \Illuminate\Container\Container
  1321. /** @var \Illuminate\Foundation\Application $instance */
  1322. $instance->scoped($abstract, $concrete);
  1323. }
  1324. /**
  1325. * Register a scoped binding if it hasn't already been registered.
  1326. *
  1327. * @param \Closure|string $abstract
  1328. * @param \Closure|string|null $concrete
  1329. * @return void
  1330. * @static
  1331. */
  1332. public static function scopedIf($abstract, $concrete = null)
  1333. {
  1334. //Method inherited from \Illuminate\Container\Container
  1335. /** @var \Illuminate\Foundation\Application $instance */
  1336. $instance->scopedIf($abstract, $concrete);
  1337. }
  1338. /**
  1339. * "Extend" an abstract type in the container.
  1340. *
  1341. * @param string $abstract
  1342. * @param \Closure $closure
  1343. * @return void
  1344. * @throws \InvalidArgumentException
  1345. * @static
  1346. */
  1347. public static function extend($abstract, $closure)
  1348. {
  1349. //Method inherited from \Illuminate\Container\Container
  1350. /** @var \Illuminate\Foundation\Application $instance */
  1351. $instance->extend($abstract, $closure);
  1352. }
  1353. /**
  1354. * Register an existing instance as shared in the container.
  1355. *
  1356. * @template TInstance of mixed
  1357. * @param string $abstract
  1358. * @param TInstance $instance
  1359. * @return TInstance
  1360. * @static
  1361. */
  1362. public static function instance($abstract, $instance)
  1363. {
  1364. //Method inherited from \Illuminate\Container\Container
  1365. /** @var \Illuminate\Foundation\Application $instance */
  1366. return $instance->instance($abstract, $instance);
  1367. }
  1368. /**
  1369. * Assign a set of tags to a given binding.
  1370. *
  1371. * @param array|string $abstracts
  1372. * @param array|mixed $tags
  1373. * @return void
  1374. * @static
  1375. */
  1376. public static function tag($abstracts, $tags)
  1377. {
  1378. //Method inherited from \Illuminate\Container\Container
  1379. /** @var \Illuminate\Foundation\Application $instance */
  1380. $instance->tag($abstracts, $tags);
  1381. }
  1382. /**
  1383. * Resolve all of the bindings for a given tag.
  1384. *
  1385. * @param string $tag
  1386. * @return iterable
  1387. * @static
  1388. */
  1389. public static function tagged($tag)
  1390. {
  1391. //Method inherited from \Illuminate\Container\Container
  1392. /** @var \Illuminate\Foundation\Application $instance */
  1393. return $instance->tagged($tag);
  1394. }
  1395. /**
  1396. * Alias a type to a different name.
  1397. *
  1398. * @param string $abstract
  1399. * @param string $alias
  1400. * @return void
  1401. * @throws \LogicException
  1402. * @static
  1403. */
  1404. public static function alias($abstract, $alias)
  1405. {
  1406. //Method inherited from \Illuminate\Container\Container
  1407. /** @var \Illuminate\Foundation\Application $instance */
  1408. $instance->alias($abstract, $alias);
  1409. }
  1410. /**
  1411. * Bind a new callback to an abstract's rebind event.
  1412. *
  1413. * @param string $abstract
  1414. * @param \Closure $callback
  1415. * @return mixed
  1416. * @static
  1417. */
  1418. public static function rebinding($abstract, $callback)
  1419. {
  1420. //Method inherited from \Illuminate\Container\Container
  1421. /** @var \Illuminate\Foundation\Application $instance */
  1422. return $instance->rebinding($abstract, $callback);
  1423. }
  1424. /**
  1425. * Refresh an instance on the given target and method.
  1426. *
  1427. * @param string $abstract
  1428. * @param mixed $target
  1429. * @param string $method
  1430. * @return mixed
  1431. * @static
  1432. */
  1433. public static function refresh($abstract, $target, $method)
  1434. {
  1435. //Method inherited from \Illuminate\Container\Container
  1436. /** @var \Illuminate\Foundation\Application $instance */
  1437. return $instance->refresh($abstract, $target, $method);
  1438. }
  1439. /**
  1440. * Wrap the given closure such that its dependencies will be injected when executed.
  1441. *
  1442. * @param \Closure $callback
  1443. * @param array $parameters
  1444. * @return \Closure
  1445. * @static
  1446. */
  1447. public static function wrap($callback, $parameters = [])
  1448. {
  1449. //Method inherited from \Illuminate\Container\Container
  1450. /** @var \Illuminate\Foundation\Application $instance */
  1451. return $instance->wrap($callback, $parameters);
  1452. }
  1453. /**
  1454. * Call the given Closure / class@method and inject its dependencies.
  1455. *
  1456. * @param callable|string $callback
  1457. * @param array<string, mixed> $parameters
  1458. * @param string|null $defaultMethod
  1459. * @return mixed
  1460. * @throws \InvalidArgumentException
  1461. * @static
  1462. */
  1463. public static function call($callback, $parameters = [], $defaultMethod = null)
  1464. {
  1465. //Method inherited from \Illuminate\Container\Container
  1466. /** @var \Illuminate\Foundation\Application $instance */
  1467. return $instance->call($callback, $parameters, $defaultMethod);
  1468. }
  1469. /**
  1470. * Get a closure to resolve the given type from the container.
  1471. *
  1472. * @template TClass of object
  1473. * @param string|class-string<TClass> $abstract
  1474. * @return ($abstract is class-string<TClass> ? \Closure(): TClass : \Closure(): mixed)
  1475. * @static
  1476. */
  1477. public static function factory($abstract)
  1478. {
  1479. //Method inherited from \Illuminate\Container\Container
  1480. /** @var \Illuminate\Foundation\Application $instance */
  1481. return $instance->factory($abstract);
  1482. }
  1483. /**
  1484. * An alias function name for make().
  1485. *
  1486. * @template TClass of object
  1487. * @param string|class-string<TClass>|callable $abstract
  1488. * @param array $parameters
  1489. * @return ($abstract is class-string<TClass> ? TClass : mixed)
  1490. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  1491. * @static
  1492. */
  1493. public static function makeWith($abstract, $parameters = [])
  1494. {
  1495. //Method inherited from \Illuminate\Container\Container
  1496. /** @var \Illuminate\Foundation\Application $instance */
  1497. return $instance->makeWith($abstract, $parameters);
  1498. }
  1499. /**
  1500. * {@inheritdoc}
  1501. *
  1502. * @template TClass of object
  1503. * @param string|class-string<TClass> $id
  1504. * @return ($id is class-string<TClass> ? TClass : mixed)
  1505. * @static
  1506. */
  1507. public static function get($id)
  1508. {
  1509. //Method inherited from \Illuminate\Container\Container
  1510. /** @var \Illuminate\Foundation\Application $instance */
  1511. return $instance->get($id);
  1512. }
  1513. /**
  1514. * Instantiate a concrete instance of the given type.
  1515. *
  1516. * @template TClass of object
  1517. * @param \Closure(static, array): TClass|class-string<TClass> $concrete
  1518. * @return TClass
  1519. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  1520. * @throws \Illuminate\Contracts\Container\CircularDependencyException
  1521. * @static
  1522. */
  1523. public static function build($concrete)
  1524. {
  1525. //Method inherited from \Illuminate\Container\Container
  1526. /** @var \Illuminate\Foundation\Application $instance */
  1527. return $instance->build($concrete);
  1528. }
  1529. /**
  1530. * Resolve a dependency based on an attribute.
  1531. *
  1532. * @param \ReflectionAttribute $attribute
  1533. * @return mixed
  1534. * @static
  1535. */
  1536. public static function resolveFromAttribute($attribute)
  1537. {
  1538. //Method inherited from \Illuminate\Container\Container
  1539. /** @var \Illuminate\Foundation\Application $instance */
  1540. return $instance->resolveFromAttribute($attribute);
  1541. }
  1542. /**
  1543. * Register a new before resolving callback for all types.
  1544. *
  1545. * @param \Closure|string $abstract
  1546. * @param \Closure|null $callback
  1547. * @return void
  1548. * @static
  1549. */
  1550. public static function beforeResolving($abstract, $callback = null)
  1551. {
  1552. //Method inherited from \Illuminate\Container\Container
  1553. /** @var \Illuminate\Foundation\Application $instance */
  1554. $instance->beforeResolving($abstract, $callback);
  1555. }
  1556. /**
  1557. * Register a new resolving callback.
  1558. *
  1559. * @param \Closure|string $abstract
  1560. * @param \Closure|null $callback
  1561. * @return void
  1562. * @static
  1563. */
  1564. public static function resolving($abstract, $callback = null)
  1565. {
  1566. //Method inherited from \Illuminate\Container\Container
  1567. /** @var \Illuminate\Foundation\Application $instance */
  1568. $instance->resolving($abstract, $callback);
  1569. }
  1570. /**
  1571. * Register a new after resolving callback for all types.
  1572. *
  1573. * @param \Closure|string $abstract
  1574. * @param \Closure|null $callback
  1575. * @return void
  1576. * @static
  1577. */
  1578. public static function afterResolving($abstract, $callback = null)
  1579. {
  1580. //Method inherited from \Illuminate\Container\Container
  1581. /** @var \Illuminate\Foundation\Application $instance */
  1582. $instance->afterResolving($abstract, $callback);
  1583. }
  1584. /**
  1585. * Register a new after resolving attribute callback for all types.
  1586. *
  1587. * @param string $attribute
  1588. * @param \Closure $callback
  1589. * @return void
  1590. * @static
  1591. */
  1592. public static function afterResolvingAttribute($attribute, $callback)
  1593. {
  1594. //Method inherited from \Illuminate\Container\Container
  1595. /** @var \Illuminate\Foundation\Application $instance */
  1596. $instance->afterResolvingAttribute($attribute, $callback);
  1597. }
  1598. /**
  1599. * Fire all of the after resolving attribute callbacks.
  1600. *
  1601. * @param \ReflectionAttribute[] $attributes
  1602. * @param mixed $object
  1603. * @return void
  1604. * @static
  1605. */
  1606. public static function fireAfterResolvingAttributeCallbacks($attributes, $object)
  1607. {
  1608. //Method inherited from \Illuminate\Container\Container
  1609. /** @var \Illuminate\Foundation\Application $instance */
  1610. $instance->fireAfterResolvingAttributeCallbacks($attributes, $object);
  1611. }
  1612. /**
  1613. * Get the name of the binding the container is currently resolving.
  1614. *
  1615. * @return class-string|string|null
  1616. * @static
  1617. */
  1618. public static function currentlyResolving()
  1619. {
  1620. //Method inherited from \Illuminate\Container\Container
  1621. /** @var \Illuminate\Foundation\Application $instance */
  1622. return $instance->currentlyResolving();
  1623. }
  1624. /**
  1625. * Get the container's bindings.
  1626. *
  1627. * @return array
  1628. * @static
  1629. */
  1630. public static function getBindings()
  1631. {
  1632. //Method inherited from \Illuminate\Container\Container
  1633. /** @var \Illuminate\Foundation\Application $instance */
  1634. return $instance->getBindings();
  1635. }
  1636. /**
  1637. * Get the alias for an abstract if available.
  1638. *
  1639. * @param string $abstract
  1640. * @return string
  1641. * @static
  1642. */
  1643. public static function getAlias($abstract)
  1644. {
  1645. //Method inherited from \Illuminate\Container\Container
  1646. /** @var \Illuminate\Foundation\Application $instance */
  1647. return $instance->getAlias($abstract);
  1648. }
  1649. /**
  1650. * Remove all of the extender callbacks for a given type.
  1651. *
  1652. * @param string $abstract
  1653. * @return void
  1654. * @static
  1655. */
  1656. public static function forgetExtenders($abstract)
  1657. {
  1658. //Method inherited from \Illuminate\Container\Container
  1659. /** @var \Illuminate\Foundation\Application $instance */
  1660. $instance->forgetExtenders($abstract);
  1661. }
  1662. /**
  1663. * Remove a resolved instance from the instance cache.
  1664. *
  1665. * @param string $abstract
  1666. * @return void
  1667. * @static
  1668. */
  1669. public static function forgetInstance($abstract)
  1670. {
  1671. //Method inherited from \Illuminate\Container\Container
  1672. /** @var \Illuminate\Foundation\Application $instance */
  1673. $instance->forgetInstance($abstract);
  1674. }
  1675. /**
  1676. * Clear all of the instances from the container.
  1677. *
  1678. * @return void
  1679. * @static
  1680. */
  1681. public static function forgetInstances()
  1682. {
  1683. //Method inherited from \Illuminate\Container\Container
  1684. /** @var \Illuminate\Foundation\Application $instance */
  1685. $instance->forgetInstances();
  1686. }
  1687. /**
  1688. * Clear all of the scoped instances from the container.
  1689. *
  1690. * @return void
  1691. * @static
  1692. */
  1693. public static function forgetScopedInstances()
  1694. {
  1695. //Method inherited from \Illuminate\Container\Container
  1696. /** @var \Illuminate\Foundation\Application $instance */
  1697. $instance->forgetScopedInstances();
  1698. }
  1699. /**
  1700. * Get the globally available instance of the container.
  1701. *
  1702. * @return static
  1703. * @static
  1704. */
  1705. public static function getInstance()
  1706. {
  1707. //Method inherited from \Illuminate\Container\Container
  1708. return \Illuminate\Foundation\Application::getInstance();
  1709. }
  1710. /**
  1711. * Set the shared instance of the container.
  1712. *
  1713. * @param \Illuminate\Contracts\Container\Container|null $container
  1714. * @return \Illuminate\Contracts\Container\Container|static
  1715. * @static
  1716. */
  1717. public static function setInstance($container = null)
  1718. {
  1719. //Method inherited from \Illuminate\Container\Container
  1720. return \Illuminate\Foundation\Application::setInstance($container);
  1721. }
  1722. /**
  1723. * Determine if a given offset exists.
  1724. *
  1725. * @param string $key
  1726. * @return bool
  1727. * @static
  1728. */
  1729. public static function offsetExists($key)
  1730. {
  1731. //Method inherited from \Illuminate\Container\Container
  1732. /** @var \Illuminate\Foundation\Application $instance */
  1733. return $instance->offsetExists($key);
  1734. }
  1735. /**
  1736. * Get the value at a given offset.
  1737. *
  1738. * @param string $key
  1739. * @return mixed
  1740. * @static
  1741. */
  1742. public static function offsetGet($key)
  1743. {
  1744. //Method inherited from \Illuminate\Container\Container
  1745. /** @var \Illuminate\Foundation\Application $instance */
  1746. return $instance->offsetGet($key);
  1747. }
  1748. /**
  1749. * Set the value at a given offset.
  1750. *
  1751. * @param string $key
  1752. * @param mixed $value
  1753. * @return void
  1754. * @static
  1755. */
  1756. public static function offsetSet($key, $value)
  1757. {
  1758. //Method inherited from \Illuminate\Container\Container
  1759. /** @var \Illuminate\Foundation\Application $instance */
  1760. $instance->offsetSet($key, $value);
  1761. }
  1762. /**
  1763. * Unset the value at a given offset.
  1764. *
  1765. * @param string $key
  1766. * @return void
  1767. * @static
  1768. */
  1769. public static function offsetUnset($key)
  1770. {
  1771. //Method inherited from \Illuminate\Container\Container
  1772. /** @var \Illuminate\Foundation\Application $instance */
  1773. $instance->offsetUnset($key);
  1774. }
  1775. /**
  1776. * Register a custom macro.
  1777. *
  1778. * @param string $name
  1779. * @param object|callable $macro
  1780. * @param-closure-this static $macro
  1781. * @return void
  1782. * @static
  1783. */
  1784. public static function macro($name, $macro)
  1785. {
  1786. \Illuminate\Foundation\Application::macro($name, $macro);
  1787. }
  1788. /**
  1789. * Mix another object into the class.
  1790. *
  1791. * @param object $mixin
  1792. * @param bool $replace
  1793. * @return void
  1794. * @throws \ReflectionException
  1795. * @static
  1796. */
  1797. public static function mixin($mixin, $replace = true)
  1798. {
  1799. \Illuminate\Foundation\Application::mixin($mixin, $replace);
  1800. }
  1801. /**
  1802. * Checks if macro is registered.
  1803. *
  1804. * @param string $name
  1805. * @return bool
  1806. * @static
  1807. */
  1808. public static function hasMacro($name)
  1809. {
  1810. return \Illuminate\Foundation\Application::hasMacro($name);
  1811. }
  1812. /**
  1813. * Flush the existing macros.
  1814. *
  1815. * @return void
  1816. * @static
  1817. */
  1818. public static function flushMacros()
  1819. {
  1820. \Illuminate\Foundation\Application::flushMacros();
  1821. }
  1822. }
  1823. /**
  1824. * @see \Illuminate\Foundation\Console\Kernel
  1825. */
  1826. class Artisan {
  1827. /**
  1828. * Re-route the Symfony command events to their Laravel counterparts.
  1829. *
  1830. * @internal
  1831. * @return \Illuminate\Foundation\Console\Kernel
  1832. * @static
  1833. */
  1834. public static function rerouteSymfonyCommandEvents()
  1835. {
  1836. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1837. return $instance->rerouteSymfonyCommandEvents();
  1838. }
  1839. /**
  1840. * Run the console application.
  1841. *
  1842. * @param \Symfony\Component\Console\Input\InputInterface $input
  1843. * @param \Symfony\Component\Console\Output\OutputInterface|null $output
  1844. * @return int
  1845. * @static
  1846. */
  1847. public static function handle($input, $output = null)
  1848. {
  1849. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1850. return $instance->handle($input, $output);
  1851. }
  1852. /**
  1853. * Terminate the application.
  1854. *
  1855. * @param \Symfony\Component\Console\Input\InputInterface $input
  1856. * @param int $status
  1857. * @return void
  1858. * @static
  1859. */
  1860. public static function terminate($input, $status)
  1861. {
  1862. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1863. $instance->terminate($input, $status);
  1864. }
  1865. /**
  1866. * Register a callback to be invoked when the command lifecycle duration exceeds a given amount of time.
  1867. *
  1868. * @param \DateTimeInterface|\Carbon\CarbonInterval|float|int $threshold
  1869. * @param callable $handler
  1870. * @return void
  1871. * @static
  1872. */
  1873. public static function whenCommandLifecycleIsLongerThan($threshold, $handler)
  1874. {
  1875. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1876. $instance->whenCommandLifecycleIsLongerThan($threshold, $handler);
  1877. }
  1878. /**
  1879. * When the command being handled started.
  1880. *
  1881. * @return \Illuminate\Support\Carbon|null
  1882. * @static
  1883. */
  1884. public static function commandStartedAt()
  1885. {
  1886. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1887. return $instance->commandStartedAt();
  1888. }
  1889. /**
  1890. * Resolve a console schedule instance.
  1891. *
  1892. * @return \Illuminate\Console\Scheduling\Schedule
  1893. * @static
  1894. */
  1895. public static function resolveConsoleSchedule()
  1896. {
  1897. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1898. return $instance->resolveConsoleSchedule();
  1899. }
  1900. /**
  1901. * Register a Closure based command with the application.
  1902. *
  1903. * @param string $signature
  1904. * @param \Closure $callback
  1905. * @return \Illuminate\Foundation\Console\ClosureCommand
  1906. * @static
  1907. */
  1908. public static function command($signature, $callback)
  1909. {
  1910. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1911. return $instance->command($signature, $callback);
  1912. }
  1913. /**
  1914. * Register the given command with the console application.
  1915. *
  1916. * @param \Symfony\Component\Console\Command\Command $command
  1917. * @return void
  1918. * @static
  1919. */
  1920. public static function registerCommand($command)
  1921. {
  1922. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1923. $instance->registerCommand($command);
  1924. }
  1925. /**
  1926. * Run an Artisan console command by name.
  1927. *
  1928. * @param string $command
  1929. * @param array $parameters
  1930. * @param \Symfony\Component\Console\Output\OutputInterface|null $outputBuffer
  1931. * @return int
  1932. * @throws \Symfony\Component\Console\Exception\CommandNotFoundException
  1933. * @static
  1934. */
  1935. public static function call($command, $parameters = [], $outputBuffer = null)
  1936. {
  1937. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1938. return $instance->call($command, $parameters, $outputBuffer);
  1939. }
  1940. /**
  1941. * Queue the given console command.
  1942. *
  1943. * @param string $command
  1944. * @param array $parameters
  1945. * @return \Illuminate\Foundation\Bus\PendingDispatch
  1946. * @static
  1947. */
  1948. public static function queue($command, $parameters = [])
  1949. {
  1950. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1951. return $instance->queue($command, $parameters);
  1952. }
  1953. /**
  1954. * Get all of the commands registered with the console.
  1955. *
  1956. * @return array
  1957. * @static
  1958. */
  1959. public static function all()
  1960. {
  1961. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1962. return $instance->all();
  1963. }
  1964. /**
  1965. * Get the output for the last run command.
  1966. *
  1967. * @return string
  1968. * @static
  1969. */
  1970. public static function output()
  1971. {
  1972. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1973. return $instance->output();
  1974. }
  1975. /**
  1976. * Bootstrap the application for artisan commands.
  1977. *
  1978. * @return void
  1979. * @static
  1980. */
  1981. public static function bootstrap()
  1982. {
  1983. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1984. $instance->bootstrap();
  1985. }
  1986. /**
  1987. * Bootstrap the application without booting service providers.
  1988. *
  1989. * @return void
  1990. * @static
  1991. */
  1992. public static function bootstrapWithoutBootingProviders()
  1993. {
  1994. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1995. $instance->bootstrapWithoutBootingProviders();
  1996. }
  1997. /**
  1998. * Set the Artisan application instance.
  1999. *
  2000. * @param \Illuminate\Console\Application|null $artisan
  2001. * @return void
  2002. * @static
  2003. */
  2004. public static function setArtisan($artisan)
  2005. {
  2006. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2007. $instance->setArtisan($artisan);
  2008. }
  2009. /**
  2010. * Set the Artisan commands provided by the application.
  2011. *
  2012. * @param array $commands
  2013. * @return \Illuminate\Foundation\Console\Kernel
  2014. * @static
  2015. */
  2016. public static function addCommands($commands)
  2017. {
  2018. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2019. return $instance->addCommands($commands);
  2020. }
  2021. /**
  2022. * Set the paths that should have their Artisan commands automatically discovered.
  2023. *
  2024. * @param array $paths
  2025. * @return \Illuminate\Foundation\Console\Kernel
  2026. * @static
  2027. */
  2028. public static function addCommandPaths($paths)
  2029. {
  2030. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2031. return $instance->addCommandPaths($paths);
  2032. }
  2033. /**
  2034. * Set the paths that should have their Artisan "routes" automatically discovered.
  2035. *
  2036. * @param array $paths
  2037. * @return \Illuminate\Foundation\Console\Kernel
  2038. * @static
  2039. */
  2040. public static function addCommandRoutePaths($paths)
  2041. {
  2042. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2043. return $instance->addCommandRoutePaths($paths);
  2044. }
  2045. }
  2046. /**
  2047. * @see \Illuminate\Auth\AuthManager
  2048. * @see \Illuminate\Auth\SessionGuard
  2049. */
  2050. class Auth {
  2051. /**
  2052. * Attempt to get the guard from the local cache.
  2053. *
  2054. * @param string|null $name
  2055. * @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard
  2056. * @static
  2057. */
  2058. public static function guard($name = null)
  2059. {
  2060. /** @var \Illuminate\Auth\AuthManager $instance */
  2061. return $instance->guard($name);
  2062. }
  2063. /**
  2064. * Create a session based authentication guard.
  2065. *
  2066. * @param string $name
  2067. * @param array $config
  2068. * @return \Illuminate\Auth\SessionGuard
  2069. * @static
  2070. */
  2071. public static function createSessionDriver($name, $config)
  2072. {
  2073. /** @var \Illuminate\Auth\AuthManager $instance */
  2074. return $instance->createSessionDriver($name, $config);
  2075. }
  2076. /**
  2077. * Create a token based authentication guard.
  2078. *
  2079. * @param string $name
  2080. * @param array $config
  2081. * @return \Illuminate\Auth\TokenGuard
  2082. * @static
  2083. */
  2084. public static function createTokenDriver($name, $config)
  2085. {
  2086. /** @var \Illuminate\Auth\AuthManager $instance */
  2087. return $instance->createTokenDriver($name, $config);
  2088. }
  2089. /**
  2090. * Get the default authentication driver name.
  2091. *
  2092. * @return string
  2093. * @static
  2094. */
  2095. public static function getDefaultDriver()
  2096. {
  2097. /** @var \Illuminate\Auth\AuthManager $instance */
  2098. return $instance->getDefaultDriver();
  2099. }
  2100. /**
  2101. * Set the default guard driver the factory should serve.
  2102. *
  2103. * @param string $name
  2104. * @return void
  2105. * @static
  2106. */
  2107. public static function shouldUse($name)
  2108. {
  2109. /** @var \Illuminate\Auth\AuthManager $instance */
  2110. $instance->shouldUse($name);
  2111. }
  2112. /**
  2113. * Set the default authentication driver name.
  2114. *
  2115. * @param string $name
  2116. * @return void
  2117. * @static
  2118. */
  2119. public static function setDefaultDriver($name)
  2120. {
  2121. /** @var \Illuminate\Auth\AuthManager $instance */
  2122. $instance->setDefaultDriver($name);
  2123. }
  2124. /**
  2125. * Register a new callback based request guard.
  2126. *
  2127. * @param string $driver
  2128. * @param callable $callback
  2129. * @return \Illuminate\Auth\AuthManager
  2130. * @static
  2131. */
  2132. public static function viaRequest($driver, $callback)
  2133. {
  2134. /** @var \Illuminate\Auth\AuthManager $instance */
  2135. return $instance->viaRequest($driver, $callback);
  2136. }
  2137. /**
  2138. * Get the user resolver callback.
  2139. *
  2140. * @return \Closure
  2141. * @static
  2142. */
  2143. public static function userResolver()
  2144. {
  2145. /** @var \Illuminate\Auth\AuthManager $instance */
  2146. return $instance->userResolver();
  2147. }
  2148. /**
  2149. * Set the callback to be used to resolve users.
  2150. *
  2151. * @param \Closure $userResolver
  2152. * @return \Illuminate\Auth\AuthManager
  2153. * @static
  2154. */
  2155. public static function resolveUsersUsing($userResolver)
  2156. {
  2157. /** @var \Illuminate\Auth\AuthManager $instance */
  2158. return $instance->resolveUsersUsing($userResolver);
  2159. }
  2160. /**
  2161. * Register a custom driver creator Closure.
  2162. *
  2163. * @param string $driver
  2164. * @param \Closure $callback
  2165. * @return \Illuminate\Auth\AuthManager
  2166. * @static
  2167. */
  2168. public static function extend($driver, $callback)
  2169. {
  2170. /** @var \Illuminate\Auth\AuthManager $instance */
  2171. return $instance->extend($driver, $callback);
  2172. }
  2173. /**
  2174. * Register a custom provider creator Closure.
  2175. *
  2176. * @param string $name
  2177. * @param \Closure $callback
  2178. * @return \Illuminate\Auth\AuthManager
  2179. * @static
  2180. */
  2181. public static function provider($name, $callback)
  2182. {
  2183. /** @var \Illuminate\Auth\AuthManager $instance */
  2184. return $instance->provider($name, $callback);
  2185. }
  2186. /**
  2187. * Determines if any guards have already been resolved.
  2188. *
  2189. * @return bool
  2190. * @static
  2191. */
  2192. public static function hasResolvedGuards()
  2193. {
  2194. /** @var \Illuminate\Auth\AuthManager $instance */
  2195. return $instance->hasResolvedGuards();
  2196. }
  2197. /**
  2198. * Forget all of the resolved guard instances.
  2199. *
  2200. * @return \Illuminate\Auth\AuthManager
  2201. * @static
  2202. */
  2203. public static function forgetGuards()
  2204. {
  2205. /** @var \Illuminate\Auth\AuthManager $instance */
  2206. return $instance->forgetGuards();
  2207. }
  2208. /**
  2209. * Set the application instance used by the manager.
  2210. *
  2211. * @param \Illuminate\Contracts\Foundation\Application $app
  2212. * @return \Illuminate\Auth\AuthManager
  2213. * @static
  2214. */
  2215. public static function setApplication($app)
  2216. {
  2217. /** @var \Illuminate\Auth\AuthManager $instance */
  2218. return $instance->setApplication($app);
  2219. }
  2220. /**
  2221. * Create the user provider implementation for the driver.
  2222. *
  2223. * @param string|null $provider
  2224. * @return \Illuminate\Contracts\Auth\UserProvider|null
  2225. * @throws \InvalidArgumentException
  2226. * @static
  2227. */
  2228. public static function createUserProvider($provider = null)
  2229. {
  2230. /** @var \Illuminate\Auth\AuthManager $instance */
  2231. return $instance->createUserProvider($provider);
  2232. }
  2233. /**
  2234. * Get the default user provider name.
  2235. *
  2236. * @return string
  2237. * @static
  2238. */
  2239. public static function getDefaultUserProvider()
  2240. {
  2241. /** @var \Illuminate\Auth\AuthManager $instance */
  2242. return $instance->getDefaultUserProvider();
  2243. }
  2244. /**
  2245. * Get the currently authenticated user.
  2246. *
  2247. * @return \App\Models\User|null
  2248. * @static
  2249. */
  2250. public static function user()
  2251. {
  2252. /** @var \Illuminate\Auth\SessionGuard $instance */
  2253. return $instance->user();
  2254. }
  2255. /**
  2256. * Get the ID for the currently authenticated user.
  2257. *
  2258. * @return int|string|null
  2259. * @static
  2260. */
  2261. public static function id()
  2262. {
  2263. /** @var \Illuminate\Auth\SessionGuard $instance */
  2264. return $instance->id();
  2265. }
  2266. /**
  2267. * Log a user into the application without sessions or cookies.
  2268. *
  2269. * @param array $credentials
  2270. * @return bool
  2271. * @static
  2272. */
  2273. public static function once($credentials = [])
  2274. {
  2275. /** @var \Illuminate\Auth\SessionGuard $instance */
  2276. return $instance->once($credentials);
  2277. }
  2278. /**
  2279. * Log the given user ID into the application without sessions or cookies.
  2280. *
  2281. * @param mixed $id
  2282. * @return \App\Models\User|false
  2283. * @static
  2284. */
  2285. public static function onceUsingId($id)
  2286. {
  2287. /** @var \Illuminate\Auth\SessionGuard $instance */
  2288. return $instance->onceUsingId($id);
  2289. }
  2290. /**
  2291. * Validate a user's credentials.
  2292. *
  2293. * @param array $credentials
  2294. * @return bool
  2295. * @static
  2296. */
  2297. public static function validate($credentials = [])
  2298. {
  2299. /** @var \Illuminate\Auth\SessionGuard $instance */
  2300. return $instance->validate($credentials);
  2301. }
  2302. /**
  2303. * Attempt to authenticate using HTTP Basic Auth.
  2304. *
  2305. * @param string $field
  2306. * @param array $extraConditions
  2307. * @return \Symfony\Component\HttpFoundation\Response|null
  2308. * @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
  2309. * @static
  2310. */
  2311. public static function basic($field = 'email', $extraConditions = [])
  2312. {
  2313. /** @var \Illuminate\Auth\SessionGuard $instance */
  2314. return $instance->basic($field, $extraConditions);
  2315. }
  2316. /**
  2317. * Perform a stateless HTTP Basic login attempt.
  2318. *
  2319. * @param string $field
  2320. * @param array $extraConditions
  2321. * @return \Symfony\Component\HttpFoundation\Response|null
  2322. * @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
  2323. * @static
  2324. */
  2325. public static function onceBasic($field = 'email', $extraConditions = [])
  2326. {
  2327. /** @var \Illuminate\Auth\SessionGuard $instance */
  2328. return $instance->onceBasic($field, $extraConditions);
  2329. }
  2330. /**
  2331. * Attempt to authenticate a user using the given credentials.
  2332. *
  2333. * @param array $credentials
  2334. * @param bool $remember
  2335. * @return bool
  2336. * @static
  2337. */
  2338. public static function attempt($credentials = [], $remember = false)
  2339. {
  2340. /** @var \Illuminate\Auth\SessionGuard $instance */
  2341. return $instance->attempt($credentials, $remember);
  2342. }
  2343. /**
  2344. * Attempt to authenticate a user with credentials and additional callbacks.
  2345. *
  2346. * @param array $credentials
  2347. * @param array|callable|null $callbacks
  2348. * @param bool $remember
  2349. * @return bool
  2350. * @static
  2351. */
  2352. public static function attemptWhen($credentials = [], $callbacks = null, $remember = false)
  2353. {
  2354. /** @var \Illuminate\Auth\SessionGuard $instance */
  2355. return $instance->attemptWhen($credentials, $callbacks, $remember);
  2356. }
  2357. /**
  2358. * Log the given user ID into the application.
  2359. *
  2360. * @param mixed $id
  2361. * @param bool $remember
  2362. * @return \App\Models\User|false
  2363. * @static
  2364. */
  2365. public static function loginUsingId($id, $remember = false)
  2366. {
  2367. /** @var \Illuminate\Auth\SessionGuard $instance */
  2368. return $instance->loginUsingId($id, $remember);
  2369. }
  2370. /**
  2371. * Log a user into the application.
  2372. *
  2373. * @param \Illuminate\Contracts\Auth\Authenticatable $user
  2374. * @param bool $remember
  2375. * @return void
  2376. * @static
  2377. */
  2378. public static function login($user, $remember = false)
  2379. {
  2380. /** @var \Illuminate\Auth\SessionGuard $instance */
  2381. $instance->login($user, $remember);
  2382. }
  2383. /**
  2384. * Log the user out of the application.
  2385. *
  2386. * @return void
  2387. * @static
  2388. */
  2389. public static function logout()
  2390. {
  2391. /** @var \Illuminate\Auth\SessionGuard $instance */
  2392. $instance->logout();
  2393. }
  2394. /**
  2395. * Log the user out of the application on their current device only.
  2396. *
  2397. * This method does not cycle the "remember" token.
  2398. *
  2399. * @return void
  2400. * @static
  2401. */
  2402. public static function logoutCurrentDevice()
  2403. {
  2404. /** @var \Illuminate\Auth\SessionGuard $instance */
  2405. $instance->logoutCurrentDevice();
  2406. }
  2407. /**
  2408. * Invalidate other sessions for the current user.
  2409. *
  2410. * The application must be using the AuthenticateSession middleware.
  2411. *
  2412. * @param string $password
  2413. * @return \App\Models\User|null
  2414. * @throws \Illuminate\Auth\AuthenticationException
  2415. * @static
  2416. */
  2417. public static function logoutOtherDevices($password)
  2418. {
  2419. /** @var \Illuminate\Auth\SessionGuard $instance */
  2420. return $instance->logoutOtherDevices($password);
  2421. }
  2422. /**
  2423. * Register an authentication attempt event listener.
  2424. *
  2425. * @param mixed $callback
  2426. * @return void
  2427. * @static
  2428. */
  2429. public static function attempting($callback)
  2430. {
  2431. /** @var \Illuminate\Auth\SessionGuard $instance */
  2432. $instance->attempting($callback);
  2433. }
  2434. /**
  2435. * Get the last user we attempted to authenticate.
  2436. *
  2437. * @return \App\Models\User
  2438. * @static
  2439. */
  2440. public static function getLastAttempted()
  2441. {
  2442. /** @var \Illuminate\Auth\SessionGuard $instance */
  2443. return $instance->getLastAttempted();
  2444. }
  2445. /**
  2446. * Get a unique identifier for the auth session value.
  2447. *
  2448. * @return string
  2449. * @static
  2450. */
  2451. public static function getName()
  2452. {
  2453. /** @var \Illuminate\Auth\SessionGuard $instance */
  2454. return $instance->getName();
  2455. }
  2456. /**
  2457. * Get the name of the cookie used to store the "recaller".
  2458. *
  2459. * @return string
  2460. * @static
  2461. */
  2462. public static function getRecallerName()
  2463. {
  2464. /** @var \Illuminate\Auth\SessionGuard $instance */
  2465. return $instance->getRecallerName();
  2466. }
  2467. /**
  2468. * Determine if the user was authenticated via "remember me" cookie.
  2469. *
  2470. * @return bool
  2471. * @static
  2472. */
  2473. public static function viaRemember()
  2474. {
  2475. /** @var \Illuminate\Auth\SessionGuard $instance */
  2476. return $instance->viaRemember();
  2477. }
  2478. /**
  2479. * Set the number of minutes the remember me cookie should be valid for.
  2480. *
  2481. * @param int $minutes
  2482. * @return \Illuminate\Auth\SessionGuard
  2483. * @static
  2484. */
  2485. public static function setRememberDuration($minutes)
  2486. {
  2487. /** @var \Illuminate\Auth\SessionGuard $instance */
  2488. return $instance->setRememberDuration($minutes);
  2489. }
  2490. /**
  2491. * Get the cookie creator instance used by the guard.
  2492. *
  2493. * @return \Illuminate\Contracts\Cookie\QueueingFactory
  2494. * @throws \RuntimeException
  2495. * @static
  2496. */
  2497. public static function getCookieJar()
  2498. {
  2499. /** @var \Illuminate\Auth\SessionGuard $instance */
  2500. return $instance->getCookieJar();
  2501. }
  2502. /**
  2503. * Set the cookie creator instance used by the guard.
  2504. *
  2505. * @param \Illuminate\Contracts\Cookie\QueueingFactory $cookie
  2506. * @return void
  2507. * @static
  2508. */
  2509. public static function setCookieJar($cookie)
  2510. {
  2511. /** @var \Illuminate\Auth\SessionGuard $instance */
  2512. $instance->setCookieJar($cookie);
  2513. }
  2514. /**
  2515. * Get the event dispatcher instance.
  2516. *
  2517. * @return \Illuminate\Contracts\Events\Dispatcher
  2518. * @static
  2519. */
  2520. public static function getDispatcher()
  2521. {
  2522. /** @var \Illuminate\Auth\SessionGuard $instance */
  2523. return $instance->getDispatcher();
  2524. }
  2525. /**
  2526. * Set the event dispatcher instance.
  2527. *
  2528. * @param \Illuminate\Contracts\Events\Dispatcher $events
  2529. * @return void
  2530. * @static
  2531. */
  2532. public static function setDispatcher($events)
  2533. {
  2534. /** @var \Illuminate\Auth\SessionGuard $instance */
  2535. $instance->setDispatcher($events);
  2536. }
  2537. /**
  2538. * Get the session store used by the guard.
  2539. *
  2540. * @return \Illuminate\Contracts\Session\Session
  2541. * @static
  2542. */
  2543. public static function getSession()
  2544. {
  2545. /** @var \Illuminate\Auth\SessionGuard $instance */
  2546. return $instance->getSession();
  2547. }
  2548. /**
  2549. * Return the currently cached user.
  2550. *
  2551. * @return \App\Models\User|null
  2552. * @static
  2553. */
  2554. public static function getUser()
  2555. {
  2556. /** @var \Illuminate\Auth\SessionGuard $instance */
  2557. return $instance->getUser();
  2558. }
  2559. /**
  2560. * Set the current user.
  2561. *
  2562. * @param \Illuminate\Contracts\Auth\Authenticatable $user
  2563. * @return \Illuminate\Auth\SessionGuard
  2564. * @static
  2565. */
  2566. public static function setUser($user)
  2567. {
  2568. /** @var \Illuminate\Auth\SessionGuard $instance */
  2569. return $instance->setUser($user);
  2570. }
  2571. /**
  2572. * Get the current request instance.
  2573. *
  2574. * @return \Symfony\Component\HttpFoundation\Request
  2575. * @static
  2576. */
  2577. public static function getRequest()
  2578. {
  2579. /** @var \Illuminate\Auth\SessionGuard $instance */
  2580. return $instance->getRequest();
  2581. }
  2582. /**
  2583. * Set the current request instance.
  2584. *
  2585. * @param \Symfony\Component\HttpFoundation\Request $request
  2586. * @return \Illuminate\Auth\SessionGuard
  2587. * @static
  2588. */
  2589. public static function setRequest($request)
  2590. {
  2591. /** @var \Illuminate\Auth\SessionGuard $instance */
  2592. return $instance->setRequest($request);
  2593. }
  2594. /**
  2595. * Get the timebox instance used by the guard.
  2596. *
  2597. * @return \Illuminate\Support\Timebox
  2598. * @static
  2599. */
  2600. public static function getTimebox()
  2601. {
  2602. /** @var \Illuminate\Auth\SessionGuard $instance */
  2603. return $instance->getTimebox();
  2604. }
  2605. /**
  2606. * Determine if the current user is authenticated. If not, throw an exception.
  2607. *
  2608. * @return \App\Models\User
  2609. * @throws \Illuminate\Auth\AuthenticationException
  2610. * @static
  2611. */
  2612. public static function authenticate()
  2613. {
  2614. /** @var \Illuminate\Auth\SessionGuard $instance */
  2615. return $instance->authenticate();
  2616. }
  2617. /**
  2618. * Determine if the guard has a user instance.
  2619. *
  2620. * @return bool
  2621. * @static
  2622. */
  2623. public static function hasUser()
  2624. {
  2625. /** @var \Illuminate\Auth\SessionGuard $instance */
  2626. return $instance->hasUser();
  2627. }
  2628. /**
  2629. * Determine if the current user is authenticated.
  2630. *
  2631. * @return bool
  2632. * @static
  2633. */
  2634. public static function check()
  2635. {
  2636. /** @var \Illuminate\Auth\SessionGuard $instance */
  2637. return $instance->check();
  2638. }
  2639. /**
  2640. * Determine if the current user is a guest.
  2641. *
  2642. * @return bool
  2643. * @static
  2644. */
  2645. public static function guest()
  2646. {
  2647. /** @var \Illuminate\Auth\SessionGuard $instance */
  2648. return $instance->guest();
  2649. }
  2650. /**
  2651. * Forget the current user.
  2652. *
  2653. * @return \Illuminate\Auth\SessionGuard
  2654. * @static
  2655. */
  2656. public static function forgetUser()
  2657. {
  2658. /** @var \Illuminate\Auth\SessionGuard $instance */
  2659. return $instance->forgetUser();
  2660. }
  2661. /**
  2662. * Get the user provider used by the guard.
  2663. *
  2664. * @return \Illuminate\Contracts\Auth\UserProvider
  2665. * @static
  2666. */
  2667. public static function getProvider()
  2668. {
  2669. /** @var \Illuminate\Auth\SessionGuard $instance */
  2670. return $instance->getProvider();
  2671. }
  2672. /**
  2673. * Set the user provider used by the guard.
  2674. *
  2675. * @param \Illuminate\Contracts\Auth\UserProvider $provider
  2676. * @return void
  2677. * @static
  2678. */
  2679. public static function setProvider($provider)
  2680. {
  2681. /** @var \Illuminate\Auth\SessionGuard $instance */
  2682. $instance->setProvider($provider);
  2683. }
  2684. /**
  2685. * Register a custom macro.
  2686. *
  2687. * @param string $name
  2688. * @param object|callable $macro
  2689. * @param-closure-this static $macro
  2690. * @return void
  2691. * @static
  2692. */
  2693. public static function macro($name, $macro)
  2694. {
  2695. \Illuminate\Auth\SessionGuard::macro($name, $macro);
  2696. }
  2697. /**
  2698. * Mix another object into the class.
  2699. *
  2700. * @param object $mixin
  2701. * @param bool $replace
  2702. * @return void
  2703. * @throws \ReflectionException
  2704. * @static
  2705. */
  2706. public static function mixin($mixin, $replace = true)
  2707. {
  2708. \Illuminate\Auth\SessionGuard::mixin($mixin, $replace);
  2709. }
  2710. /**
  2711. * Checks if macro is registered.
  2712. *
  2713. * @param string $name
  2714. * @return bool
  2715. * @static
  2716. */
  2717. public static function hasMacro($name)
  2718. {
  2719. return \Illuminate\Auth\SessionGuard::hasMacro($name);
  2720. }
  2721. /**
  2722. * Flush the existing macros.
  2723. *
  2724. * @return void
  2725. * @static
  2726. */
  2727. public static function flushMacros()
  2728. {
  2729. \Illuminate\Auth\SessionGuard::flushMacros();
  2730. }
  2731. }
  2732. /**
  2733. * @see \Illuminate\View\Compilers\BladeCompiler
  2734. */
  2735. class Blade {
  2736. /**
  2737. * Compile the view at the given path.
  2738. *
  2739. * @param string|null $path
  2740. * @return void
  2741. * @static
  2742. */
  2743. public static function compile($path = null)
  2744. {
  2745. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2746. $instance->compile($path);
  2747. }
  2748. /**
  2749. * Get the path currently being compiled.
  2750. *
  2751. * @return string
  2752. * @static
  2753. */
  2754. public static function getPath()
  2755. {
  2756. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2757. return $instance->getPath();
  2758. }
  2759. /**
  2760. * Set the path currently being compiled.
  2761. *
  2762. * @param string $path
  2763. * @return void
  2764. * @static
  2765. */
  2766. public static function setPath($path)
  2767. {
  2768. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2769. $instance->setPath($path);
  2770. }
  2771. /**
  2772. * Compile the given Blade template contents.
  2773. *
  2774. * @param string $value
  2775. * @return string
  2776. * @static
  2777. */
  2778. public static function compileString($value)
  2779. {
  2780. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2781. return $instance->compileString($value);
  2782. }
  2783. /**
  2784. * Evaluate and render a Blade string to HTML.
  2785. *
  2786. * @param string $string
  2787. * @param array $data
  2788. * @param bool $deleteCachedView
  2789. * @return string
  2790. * @static
  2791. */
  2792. public static function render($string, $data = [], $deleteCachedView = false)
  2793. {
  2794. return \Illuminate\View\Compilers\BladeCompiler::render($string, $data, $deleteCachedView);
  2795. }
  2796. /**
  2797. * Render a component instance to HTML.
  2798. *
  2799. * @param \Illuminate\View\Component $component
  2800. * @return string
  2801. * @static
  2802. */
  2803. public static function renderComponent($component)
  2804. {
  2805. return \Illuminate\View\Compilers\BladeCompiler::renderComponent($component);
  2806. }
  2807. /**
  2808. * Strip the parentheses from the given expression.
  2809. *
  2810. * @param string $expression
  2811. * @return string
  2812. * @static
  2813. */
  2814. public static function stripParentheses($expression)
  2815. {
  2816. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2817. return $instance->stripParentheses($expression);
  2818. }
  2819. /**
  2820. * Register a custom Blade compiler.
  2821. *
  2822. * @param callable $compiler
  2823. * @return void
  2824. * @static
  2825. */
  2826. public static function extend($compiler)
  2827. {
  2828. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2829. $instance->extend($compiler);
  2830. }
  2831. /**
  2832. * Get the extensions used by the compiler.
  2833. *
  2834. * @return array
  2835. * @static
  2836. */
  2837. public static function getExtensions()
  2838. {
  2839. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2840. return $instance->getExtensions();
  2841. }
  2842. /**
  2843. * Register an "if" statement directive.
  2844. *
  2845. * @param string $name
  2846. * @param callable $callback
  2847. * @return void
  2848. * @static
  2849. */
  2850. public static function if($name, $callback)
  2851. {
  2852. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2853. $instance->if($name, $callback);
  2854. }
  2855. /**
  2856. * Check the result of a condition.
  2857. *
  2858. * @param string $name
  2859. * @param mixed $parameters
  2860. * @return bool
  2861. * @static
  2862. */
  2863. public static function check($name, ...$parameters)
  2864. {
  2865. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2866. return $instance->check($name, ...$parameters);
  2867. }
  2868. /**
  2869. * Register a class-based component alias directive.
  2870. *
  2871. * @param string $class
  2872. * @param string|null $alias
  2873. * @param string $prefix
  2874. * @return void
  2875. * @static
  2876. */
  2877. public static function component($class, $alias = null, $prefix = '')
  2878. {
  2879. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2880. $instance->component($class, $alias, $prefix);
  2881. }
  2882. /**
  2883. * Register an array of class-based components.
  2884. *
  2885. * @param array $components
  2886. * @param string $prefix
  2887. * @return void
  2888. * @static
  2889. */
  2890. public static function components($components, $prefix = '')
  2891. {
  2892. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2893. $instance->components($components, $prefix);
  2894. }
  2895. /**
  2896. * Get the registered class component aliases.
  2897. *
  2898. * @return array
  2899. * @static
  2900. */
  2901. public static function getClassComponentAliases()
  2902. {
  2903. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2904. return $instance->getClassComponentAliases();
  2905. }
  2906. /**
  2907. * Register a new anonymous component path.
  2908. *
  2909. * @param string $path
  2910. * @param string|null $prefix
  2911. * @return void
  2912. * @static
  2913. */
  2914. public static function anonymousComponentPath($path, $prefix = null)
  2915. {
  2916. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2917. $instance->anonymousComponentPath($path, $prefix);
  2918. }
  2919. /**
  2920. * Register an anonymous component namespace.
  2921. *
  2922. * @param string $directory
  2923. * @param string|null $prefix
  2924. * @return void
  2925. * @static
  2926. */
  2927. public static function anonymousComponentNamespace($directory, $prefix = null)
  2928. {
  2929. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2930. $instance->anonymousComponentNamespace($directory, $prefix);
  2931. }
  2932. /**
  2933. * Register a class-based component namespace.
  2934. *
  2935. * @param string $namespace
  2936. * @param string $prefix
  2937. * @return void
  2938. * @static
  2939. */
  2940. public static function componentNamespace($namespace, $prefix)
  2941. {
  2942. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2943. $instance->componentNamespace($namespace, $prefix);
  2944. }
  2945. /**
  2946. * Get the registered anonymous component paths.
  2947. *
  2948. * @return array
  2949. * @static
  2950. */
  2951. public static function getAnonymousComponentPaths()
  2952. {
  2953. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2954. return $instance->getAnonymousComponentPaths();
  2955. }
  2956. /**
  2957. * Get the registered anonymous component namespaces.
  2958. *
  2959. * @return array
  2960. * @static
  2961. */
  2962. public static function getAnonymousComponentNamespaces()
  2963. {
  2964. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2965. return $instance->getAnonymousComponentNamespaces();
  2966. }
  2967. /**
  2968. * Get the registered class component namespaces.
  2969. *
  2970. * @return array
  2971. * @static
  2972. */
  2973. public static function getClassComponentNamespaces()
  2974. {
  2975. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2976. return $instance->getClassComponentNamespaces();
  2977. }
  2978. /**
  2979. * Register a component alias directive.
  2980. *
  2981. * @param string $path
  2982. * @param string|null $alias
  2983. * @return void
  2984. * @static
  2985. */
  2986. public static function aliasComponent($path, $alias = null)
  2987. {
  2988. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2989. $instance->aliasComponent($path, $alias);
  2990. }
  2991. /**
  2992. * Register an include alias directive.
  2993. *
  2994. * @param string $path
  2995. * @param string|null $alias
  2996. * @return void
  2997. * @static
  2998. */
  2999. public static function include($path, $alias = null)
  3000. {
  3001. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3002. $instance->include($path, $alias);
  3003. }
  3004. /**
  3005. * Register an include alias directive.
  3006. *
  3007. * @param string $path
  3008. * @param string|null $alias
  3009. * @return void
  3010. * @static
  3011. */
  3012. public static function aliasInclude($path, $alias = null)
  3013. {
  3014. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3015. $instance->aliasInclude($path, $alias);
  3016. }
  3017. /**
  3018. * Register a handler for custom directives, binding the handler to the compiler.
  3019. *
  3020. * @param string $name
  3021. * @param callable $handler
  3022. * @return void
  3023. * @throws \InvalidArgumentException
  3024. * @static
  3025. */
  3026. public static function bindDirective($name, $handler)
  3027. {
  3028. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3029. $instance->bindDirective($name, $handler);
  3030. }
  3031. /**
  3032. * Register a handler for custom directives.
  3033. *
  3034. * @param string $name
  3035. * @param callable $handler
  3036. * @param bool $bind
  3037. * @return void
  3038. * @throws \InvalidArgumentException
  3039. * @static
  3040. */
  3041. public static function directive($name, $handler, $bind = false)
  3042. {
  3043. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3044. $instance->directive($name, $handler, $bind);
  3045. }
  3046. /**
  3047. * Get the list of custom directives.
  3048. *
  3049. * @return array
  3050. * @static
  3051. */
  3052. public static function getCustomDirectives()
  3053. {
  3054. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3055. return $instance->getCustomDirectives();
  3056. }
  3057. /**
  3058. * Indicate that the following callable should be used to prepare strings for compilation.
  3059. *
  3060. * @param callable $callback
  3061. * @return \Illuminate\View\Compilers\BladeCompiler
  3062. * @static
  3063. */
  3064. public static function prepareStringsForCompilationUsing($callback)
  3065. {
  3066. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3067. return $instance->prepareStringsForCompilationUsing($callback);
  3068. }
  3069. /**
  3070. * Register a new precompiler.
  3071. *
  3072. * @param callable $precompiler
  3073. * @return void
  3074. * @static
  3075. */
  3076. public static function precompiler($precompiler)
  3077. {
  3078. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3079. $instance->precompiler($precompiler);
  3080. }
  3081. /**
  3082. * Execute the given callback using a custom echo format.
  3083. *
  3084. * @param string $format
  3085. * @param callable $callback
  3086. * @return string
  3087. * @static
  3088. */
  3089. public static function usingEchoFormat($format, $callback)
  3090. {
  3091. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3092. return $instance->usingEchoFormat($format, $callback);
  3093. }
  3094. /**
  3095. * Set the echo format to be used by the compiler.
  3096. *
  3097. * @param string $format
  3098. * @return void
  3099. * @static
  3100. */
  3101. public static function setEchoFormat($format)
  3102. {
  3103. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3104. $instance->setEchoFormat($format);
  3105. }
  3106. /**
  3107. * Set the "echo" format to double encode entities.
  3108. *
  3109. * @return void
  3110. * @static
  3111. */
  3112. public static function withDoubleEncoding()
  3113. {
  3114. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3115. $instance->withDoubleEncoding();
  3116. }
  3117. /**
  3118. * Set the "echo" format to not double encode entities.
  3119. *
  3120. * @return void
  3121. * @static
  3122. */
  3123. public static function withoutDoubleEncoding()
  3124. {
  3125. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3126. $instance->withoutDoubleEncoding();
  3127. }
  3128. /**
  3129. * Indicate that component tags should not be compiled.
  3130. *
  3131. * @return void
  3132. * @static
  3133. */
  3134. public static function withoutComponentTags()
  3135. {
  3136. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3137. $instance->withoutComponentTags();
  3138. }
  3139. /**
  3140. * Get the path to the compiled version of a view.
  3141. *
  3142. * @param string $path
  3143. * @return string
  3144. * @static
  3145. */
  3146. public static function getCompiledPath($path)
  3147. {
  3148. //Method inherited from \Illuminate\View\Compilers\Compiler
  3149. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3150. return $instance->getCompiledPath($path);
  3151. }
  3152. /**
  3153. * Determine if the view at the given path is expired.
  3154. *
  3155. * @param string $path
  3156. * @return bool
  3157. * @throws \ErrorException
  3158. * @static
  3159. */
  3160. public static function isExpired($path)
  3161. {
  3162. //Method inherited from \Illuminate\View\Compilers\Compiler
  3163. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3164. return $instance->isExpired($path);
  3165. }
  3166. /**
  3167. * Get a new component hash for a component name.
  3168. *
  3169. * @param string $component
  3170. * @return string
  3171. * @static
  3172. */
  3173. public static function newComponentHash($component)
  3174. {
  3175. return \Illuminate\View\Compilers\BladeCompiler::newComponentHash($component);
  3176. }
  3177. /**
  3178. * Compile a class component opening.
  3179. *
  3180. * @param string $component
  3181. * @param string $alias
  3182. * @param string $data
  3183. * @param string $hash
  3184. * @return string
  3185. * @static
  3186. */
  3187. public static function compileClassComponentOpening($component, $alias, $data, $hash)
  3188. {
  3189. return \Illuminate\View\Compilers\BladeCompiler::compileClassComponentOpening($component, $alias, $data, $hash);
  3190. }
  3191. /**
  3192. * Compile the end-component statements into valid PHP.
  3193. *
  3194. * @return string
  3195. * @static
  3196. */
  3197. public static function compileEndComponentClass()
  3198. {
  3199. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3200. return $instance->compileEndComponentClass();
  3201. }
  3202. /**
  3203. * Sanitize the given component attribute value.
  3204. *
  3205. * @param mixed $value
  3206. * @return mixed
  3207. * @static
  3208. */
  3209. public static function sanitizeComponentAttribute($value)
  3210. {
  3211. return \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($value);
  3212. }
  3213. /**
  3214. * Compile an end-once block into valid PHP.
  3215. *
  3216. * @return string
  3217. * @static
  3218. */
  3219. public static function compileEndOnce()
  3220. {
  3221. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3222. return $instance->compileEndOnce();
  3223. }
  3224. /**
  3225. * Add a handler to be executed before echoing a given class.
  3226. *
  3227. * @param string|callable $class
  3228. * @param callable|null $handler
  3229. * @return void
  3230. * @static
  3231. */
  3232. public static function stringable($class, $handler = null)
  3233. {
  3234. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3235. $instance->stringable($class, $handler);
  3236. }
  3237. /**
  3238. * Compile Blade echos into valid PHP.
  3239. *
  3240. * @param string $value
  3241. * @return string
  3242. * @static
  3243. */
  3244. public static function compileEchos($value)
  3245. {
  3246. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3247. return $instance->compileEchos($value);
  3248. }
  3249. /**
  3250. * Apply the echo handler for the value if it exists.
  3251. *
  3252. * @param string $value
  3253. * @return string
  3254. * @static
  3255. */
  3256. public static function applyEchoHandler($value)
  3257. {
  3258. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3259. return $instance->applyEchoHandler($value);
  3260. }
  3261. }
  3262. /**
  3263. * @method static mixed auth(\Illuminate\Http\Request $request)
  3264. * @method static mixed validAuthenticationResponse(\Illuminate\Http\Request $request, mixed $result)
  3265. * @method static void broadcast(array $channels, string $event, array $payload = [])
  3266. * @method static array|null resolveAuthenticatedUser(\Illuminate\Http\Request $request)
  3267. * @method static void resolveAuthenticatedUserUsing(\Closure $callback)
  3268. * @method static \Illuminate\Broadcasting\Broadcasters\Broadcaster channel(\Illuminate\Contracts\Broadcasting\HasBroadcastChannel|string $channel, callable|string $callback, array $options = [])
  3269. * @method static \Illuminate\Support\Collection getChannels()
  3270. * @see \Illuminate\Broadcasting\BroadcastManager
  3271. * @see \Illuminate\Broadcasting\Broadcasters\Broadcaster
  3272. */
  3273. class Broadcast {
  3274. /**
  3275. * Register the routes for handling broadcast channel authentication and sockets.
  3276. *
  3277. * @param array|null $attributes
  3278. * @return void
  3279. * @static
  3280. */
  3281. public static function routes($attributes = null)
  3282. {
  3283. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3284. $instance->routes($attributes);
  3285. }
  3286. /**
  3287. * Register the routes for handling broadcast user authentication.
  3288. *
  3289. * @param array|null $attributes
  3290. * @return void
  3291. * @static
  3292. */
  3293. public static function userRoutes($attributes = null)
  3294. {
  3295. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3296. $instance->userRoutes($attributes);
  3297. }
  3298. /**
  3299. * Register the routes for handling broadcast authentication and sockets.
  3300. *
  3301. * Alias of "routes" method.
  3302. *
  3303. * @param array|null $attributes
  3304. * @return void
  3305. * @static
  3306. */
  3307. public static function channelRoutes($attributes = null)
  3308. {
  3309. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3310. $instance->channelRoutes($attributes);
  3311. }
  3312. /**
  3313. * Get the socket ID for the given request.
  3314. *
  3315. * @param \Illuminate\Http\Request|null $request
  3316. * @return string|null
  3317. * @static
  3318. */
  3319. public static function socket($request = null)
  3320. {
  3321. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3322. return $instance->socket($request);
  3323. }
  3324. /**
  3325. * Begin sending an anonymous broadcast to the given channels.
  3326. *
  3327. * @static
  3328. */
  3329. public static function on($channels)
  3330. {
  3331. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3332. return $instance->on($channels);
  3333. }
  3334. /**
  3335. * Begin sending an anonymous broadcast to the given private channels.
  3336. *
  3337. * @static
  3338. */
  3339. public static function private($channel)
  3340. {
  3341. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3342. return $instance->private($channel);
  3343. }
  3344. /**
  3345. * Begin sending an anonymous broadcast to the given presence channels.
  3346. *
  3347. * @static
  3348. */
  3349. public static function presence($channel)
  3350. {
  3351. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3352. return $instance->presence($channel);
  3353. }
  3354. /**
  3355. * Begin broadcasting an event.
  3356. *
  3357. * @param mixed|null $event
  3358. * @return \Illuminate\Broadcasting\PendingBroadcast
  3359. * @static
  3360. */
  3361. public static function event($event = null)
  3362. {
  3363. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3364. return $instance->event($event);
  3365. }
  3366. /**
  3367. * Queue the given event for broadcast.
  3368. *
  3369. * @param mixed $event
  3370. * @return void
  3371. * @static
  3372. */
  3373. public static function queue($event)
  3374. {
  3375. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3376. $instance->queue($event);
  3377. }
  3378. /**
  3379. * Get a driver instance.
  3380. *
  3381. * @param string|null $driver
  3382. * @return mixed
  3383. * @static
  3384. */
  3385. public static function connection($driver = null)
  3386. {
  3387. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3388. return $instance->connection($driver);
  3389. }
  3390. /**
  3391. * Get a driver instance.
  3392. *
  3393. * @param string|null $name
  3394. * @return mixed
  3395. * @static
  3396. */
  3397. public static function driver($name = null)
  3398. {
  3399. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3400. return $instance->driver($name);
  3401. }
  3402. /**
  3403. * Get a Pusher instance for the given configuration.
  3404. *
  3405. * @param array $config
  3406. * @return \Pusher\Pusher
  3407. * @static
  3408. */
  3409. public static function pusher($config)
  3410. {
  3411. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3412. return $instance->pusher($config);
  3413. }
  3414. /**
  3415. * Get an Ably instance for the given configuration.
  3416. *
  3417. * @param array $config
  3418. * @return \Ably\AblyRest
  3419. * @static
  3420. */
  3421. public static function ably($config)
  3422. {
  3423. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3424. return $instance->ably($config);
  3425. }
  3426. /**
  3427. * Get the default driver name.
  3428. *
  3429. * @return string
  3430. * @static
  3431. */
  3432. public static function getDefaultDriver()
  3433. {
  3434. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3435. return $instance->getDefaultDriver();
  3436. }
  3437. /**
  3438. * Set the default driver name.
  3439. *
  3440. * @param string $name
  3441. * @return void
  3442. * @static
  3443. */
  3444. public static function setDefaultDriver($name)
  3445. {
  3446. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3447. $instance->setDefaultDriver($name);
  3448. }
  3449. /**
  3450. * Disconnect the given disk and remove from local cache.
  3451. *
  3452. * @param string|null $name
  3453. * @return void
  3454. * @static
  3455. */
  3456. public static function purge($name = null)
  3457. {
  3458. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3459. $instance->purge($name);
  3460. }
  3461. /**
  3462. * Register a custom driver creator Closure.
  3463. *
  3464. * @param string $driver
  3465. * @param \Closure $callback
  3466. * @return \Illuminate\Broadcasting\BroadcastManager
  3467. * @static
  3468. */
  3469. public static function extend($driver, $callback)
  3470. {
  3471. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3472. return $instance->extend($driver, $callback);
  3473. }
  3474. /**
  3475. * Get the application instance used by the manager.
  3476. *
  3477. * @return \Illuminate\Contracts\Foundation\Application
  3478. * @static
  3479. */
  3480. public static function getApplication()
  3481. {
  3482. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3483. return $instance->getApplication();
  3484. }
  3485. /**
  3486. * Set the application instance used by the manager.
  3487. *
  3488. * @param \Illuminate\Contracts\Foundation\Application $app
  3489. * @return \Illuminate\Broadcasting\BroadcastManager
  3490. * @static
  3491. */
  3492. public static function setApplication($app)
  3493. {
  3494. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3495. return $instance->setApplication($app);
  3496. }
  3497. /**
  3498. * Forget all of the resolved driver instances.
  3499. *
  3500. * @return \Illuminate\Broadcasting\BroadcastManager
  3501. * @static
  3502. */
  3503. public static function forgetDrivers()
  3504. {
  3505. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3506. return $instance->forgetDrivers();
  3507. }
  3508. }
  3509. /**
  3510. * @see \Illuminate\Bus\Dispatcher
  3511. * @see \Illuminate\Support\Testing\Fakes\BusFake
  3512. */
  3513. class Bus {
  3514. /**
  3515. * Dispatch a command to its appropriate handler.
  3516. *
  3517. * @param mixed $command
  3518. * @return mixed
  3519. * @static
  3520. */
  3521. public static function dispatch($command)
  3522. {
  3523. /** @var \Illuminate\Bus\Dispatcher $instance */
  3524. return $instance->dispatch($command);
  3525. }
  3526. /**
  3527. * Dispatch a command to its appropriate handler in the current process.
  3528. *
  3529. * Queueable jobs will be dispatched to the "sync" queue.
  3530. *
  3531. * @param mixed $command
  3532. * @param mixed $handler
  3533. * @return mixed
  3534. * @static
  3535. */
  3536. public static function dispatchSync($command, $handler = null)
  3537. {
  3538. /** @var \Illuminate\Bus\Dispatcher $instance */
  3539. return $instance->dispatchSync($command, $handler);
  3540. }
  3541. /**
  3542. * Dispatch a command to its appropriate handler in the current process without using the synchronous queue.
  3543. *
  3544. * @param mixed $command
  3545. * @param mixed $handler
  3546. * @return mixed
  3547. * @static
  3548. */
  3549. public static function dispatchNow($command, $handler = null)
  3550. {
  3551. /** @var \Illuminate\Bus\Dispatcher $instance */
  3552. return $instance->dispatchNow($command, $handler);
  3553. }
  3554. /**
  3555. * Attempt to find the batch with the given ID.
  3556. *
  3557. * @param string $batchId
  3558. * @return \Illuminate\Bus\Batch|null
  3559. * @static
  3560. */
  3561. public static function findBatch($batchId)
  3562. {
  3563. /** @var \Illuminate\Bus\Dispatcher $instance */
  3564. return $instance->findBatch($batchId);
  3565. }
  3566. /**
  3567. * Create a new batch of queueable jobs.
  3568. *
  3569. * @param \Illuminate\Support\Collection|array|mixed $jobs
  3570. * @return \Illuminate\Bus\PendingBatch
  3571. * @static
  3572. */
  3573. public static function batch($jobs)
  3574. {
  3575. /** @var \Illuminate\Bus\Dispatcher $instance */
  3576. return $instance->batch($jobs);
  3577. }
  3578. /**
  3579. * Create a new chain of queueable jobs.
  3580. *
  3581. * @param \Illuminate\Support\Collection|array $jobs
  3582. * @return \Illuminate\Foundation\Bus\PendingChain
  3583. * @static
  3584. */
  3585. public static function chain($jobs)
  3586. {
  3587. /** @var \Illuminate\Bus\Dispatcher $instance */
  3588. return $instance->chain($jobs);
  3589. }
  3590. /**
  3591. * Determine if the given command has a handler.
  3592. *
  3593. * @param mixed $command
  3594. * @return bool
  3595. * @static
  3596. */
  3597. public static function hasCommandHandler($command)
  3598. {
  3599. /** @var \Illuminate\Bus\Dispatcher $instance */
  3600. return $instance->hasCommandHandler($command);
  3601. }
  3602. /**
  3603. * Retrieve the handler for a command.
  3604. *
  3605. * @param mixed $command
  3606. * @return bool|mixed
  3607. * @static
  3608. */
  3609. public static function getCommandHandler($command)
  3610. {
  3611. /** @var \Illuminate\Bus\Dispatcher $instance */
  3612. return $instance->getCommandHandler($command);
  3613. }
  3614. /**
  3615. * Dispatch a command to its appropriate handler behind a queue.
  3616. *
  3617. * @param mixed $command
  3618. * @return mixed
  3619. * @throws \RuntimeException
  3620. * @static
  3621. */
  3622. public static function dispatchToQueue($command)
  3623. {
  3624. /** @var \Illuminate\Bus\Dispatcher $instance */
  3625. return $instance->dispatchToQueue($command);
  3626. }
  3627. /**
  3628. * Dispatch a command to its appropriate handler after the current process.
  3629. *
  3630. * @param mixed $command
  3631. * @param mixed $handler
  3632. * @return void
  3633. * @static
  3634. */
  3635. public static function dispatchAfterResponse($command, $handler = null)
  3636. {
  3637. /** @var \Illuminate\Bus\Dispatcher $instance */
  3638. $instance->dispatchAfterResponse($command, $handler);
  3639. }
  3640. /**
  3641. * Set the pipes through which commands should be piped before dispatching.
  3642. *
  3643. * @param array $pipes
  3644. * @return \Illuminate\Bus\Dispatcher
  3645. * @static
  3646. */
  3647. public static function pipeThrough($pipes)
  3648. {
  3649. /** @var \Illuminate\Bus\Dispatcher $instance */
  3650. return $instance->pipeThrough($pipes);
  3651. }
  3652. /**
  3653. * Map a command to a handler.
  3654. *
  3655. * @param array $map
  3656. * @return \Illuminate\Bus\Dispatcher
  3657. * @static
  3658. */
  3659. public static function map($map)
  3660. {
  3661. /** @var \Illuminate\Bus\Dispatcher $instance */
  3662. return $instance->map($map);
  3663. }
  3664. /**
  3665. * Allow dispatching after responses.
  3666. *
  3667. * @return \Illuminate\Bus\Dispatcher
  3668. * @static
  3669. */
  3670. public static function withDispatchingAfterResponses()
  3671. {
  3672. /** @var \Illuminate\Bus\Dispatcher $instance */
  3673. return $instance->withDispatchingAfterResponses();
  3674. }
  3675. /**
  3676. * Disable dispatching after responses.
  3677. *
  3678. * @return \Illuminate\Bus\Dispatcher
  3679. * @static
  3680. */
  3681. public static function withoutDispatchingAfterResponses()
  3682. {
  3683. /** @var \Illuminate\Bus\Dispatcher $instance */
  3684. return $instance->withoutDispatchingAfterResponses();
  3685. }
  3686. /**
  3687. * Specify the jobs that should be dispatched instead of faked.
  3688. *
  3689. * @param array|string $jobsToDispatch
  3690. * @return \Illuminate\Support\Testing\Fakes\BusFake
  3691. * @static
  3692. */
  3693. public static function except($jobsToDispatch)
  3694. {
  3695. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3696. return $instance->except($jobsToDispatch);
  3697. }
  3698. /**
  3699. * Assert if a job was dispatched based on a truth-test callback.
  3700. *
  3701. * @param string|\Closure $command
  3702. * @param callable|int|null $callback
  3703. * @return void
  3704. * @static
  3705. */
  3706. public static function assertDispatched($command, $callback = null)
  3707. {
  3708. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3709. $instance->assertDispatched($command, $callback);
  3710. }
  3711. /**
  3712. * Assert if a job was pushed a number of times.
  3713. *
  3714. * @param string|\Closure $command
  3715. * @param int $times
  3716. * @return void
  3717. * @static
  3718. */
  3719. public static function assertDispatchedTimes($command, $times = 1)
  3720. {
  3721. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3722. $instance->assertDispatchedTimes($command, $times);
  3723. }
  3724. /**
  3725. * Determine if a job was dispatched based on a truth-test callback.
  3726. *
  3727. * @param string|\Closure $command
  3728. * @param callable|null $callback
  3729. * @return void
  3730. * @static
  3731. */
  3732. public static function assertNotDispatched($command, $callback = null)
  3733. {
  3734. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3735. $instance->assertNotDispatched($command, $callback);
  3736. }
  3737. /**
  3738. * Assert that no jobs were dispatched.
  3739. *
  3740. * @return void
  3741. * @static
  3742. */
  3743. public static function assertNothingDispatched()
  3744. {
  3745. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3746. $instance->assertNothingDispatched();
  3747. }
  3748. /**
  3749. * Assert if a job was explicitly dispatched synchronously based on a truth-test callback.
  3750. *
  3751. * @param string|\Closure $command
  3752. * @param callable|int|null $callback
  3753. * @return void
  3754. * @static
  3755. */
  3756. public static function assertDispatchedSync($command, $callback = null)
  3757. {
  3758. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3759. $instance->assertDispatchedSync($command, $callback);
  3760. }
  3761. /**
  3762. * Assert if a job was pushed synchronously a number of times.
  3763. *
  3764. * @param string|\Closure $command
  3765. * @param int $times
  3766. * @return void
  3767. * @static
  3768. */
  3769. public static function assertDispatchedSyncTimes($command, $times = 1)
  3770. {
  3771. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3772. $instance->assertDispatchedSyncTimes($command, $times);
  3773. }
  3774. /**
  3775. * Determine if a job was dispatched based on a truth-test callback.
  3776. *
  3777. * @param string|\Closure $command
  3778. * @param callable|null $callback
  3779. * @return void
  3780. * @static
  3781. */
  3782. public static function assertNotDispatchedSync($command, $callback = null)
  3783. {
  3784. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3785. $instance->assertNotDispatchedSync($command, $callback);
  3786. }
  3787. /**
  3788. * Assert if a job was dispatched after the response was sent based on a truth-test callback.
  3789. *
  3790. * @param string|\Closure $command
  3791. * @param callable|int|null $callback
  3792. * @return void
  3793. * @static
  3794. */
  3795. public static function assertDispatchedAfterResponse($command, $callback = null)
  3796. {
  3797. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3798. $instance->assertDispatchedAfterResponse($command, $callback);
  3799. }
  3800. /**
  3801. * Assert if a job was pushed after the response was sent a number of times.
  3802. *
  3803. * @param string|\Closure $command
  3804. * @param int $times
  3805. * @return void
  3806. * @static
  3807. */
  3808. public static function assertDispatchedAfterResponseTimes($command, $times = 1)
  3809. {
  3810. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3811. $instance->assertDispatchedAfterResponseTimes($command, $times);
  3812. }
  3813. /**
  3814. * Determine if a job was dispatched based on a truth-test callback.
  3815. *
  3816. * @param string|\Closure $command
  3817. * @param callable|null $callback
  3818. * @return void
  3819. * @static
  3820. */
  3821. public static function assertNotDispatchedAfterResponse($command, $callback = null)
  3822. {
  3823. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3824. $instance->assertNotDispatchedAfterResponse($command, $callback);
  3825. }
  3826. /**
  3827. * Assert if a chain of jobs was dispatched.
  3828. *
  3829. * @param array $expectedChain
  3830. * @return void
  3831. * @static
  3832. */
  3833. public static function assertChained($expectedChain)
  3834. {
  3835. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3836. $instance->assertChained($expectedChain);
  3837. }
  3838. /**
  3839. * Assert no chained jobs was dispatched.
  3840. *
  3841. * @return void
  3842. * @static
  3843. */
  3844. public static function assertNothingChained()
  3845. {
  3846. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3847. $instance->assertNothingChained();
  3848. }
  3849. /**
  3850. * Assert if a job was dispatched with an empty chain based on a truth-test callback.
  3851. *
  3852. * @param string|\Closure $command
  3853. * @param callable|null $callback
  3854. * @return void
  3855. * @static
  3856. */
  3857. public static function assertDispatchedWithoutChain($command, $callback = null)
  3858. {
  3859. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3860. $instance->assertDispatchedWithoutChain($command, $callback);
  3861. }
  3862. /**
  3863. * Create a new assertion about a chained batch.
  3864. *
  3865. * @param \Closure $callback
  3866. * @return \Illuminate\Support\Testing\Fakes\ChainedBatchTruthTest
  3867. * @static
  3868. */
  3869. public static function chainedBatch($callback)
  3870. {
  3871. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3872. return $instance->chainedBatch($callback);
  3873. }
  3874. /**
  3875. * Assert if a batch was dispatched based on a truth-test callback.
  3876. *
  3877. * @param callable $callback
  3878. * @return void
  3879. * @static
  3880. */
  3881. public static function assertBatched($callback)
  3882. {
  3883. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3884. $instance->assertBatched($callback);
  3885. }
  3886. /**
  3887. * Assert the number of batches that have been dispatched.
  3888. *
  3889. * @param int $count
  3890. * @return void
  3891. * @static
  3892. */
  3893. public static function assertBatchCount($count)
  3894. {
  3895. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3896. $instance->assertBatchCount($count);
  3897. }
  3898. /**
  3899. * Assert that no batched jobs were dispatched.
  3900. *
  3901. * @return void
  3902. * @static
  3903. */
  3904. public static function assertNothingBatched()
  3905. {
  3906. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3907. $instance->assertNothingBatched();
  3908. }
  3909. /**
  3910. * Assert that no jobs were dispatched, chained, or batched.
  3911. *
  3912. * @return void
  3913. * @static
  3914. */
  3915. public static function assertNothingPlaced()
  3916. {
  3917. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3918. $instance->assertNothingPlaced();
  3919. }
  3920. /**
  3921. * Get all of the jobs matching a truth-test callback.
  3922. *
  3923. * @param string $command
  3924. * @param callable|null $callback
  3925. * @return \Illuminate\Support\Collection
  3926. * @static
  3927. */
  3928. public static function dispatched($command, $callback = null)
  3929. {
  3930. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3931. return $instance->dispatched($command, $callback);
  3932. }
  3933. /**
  3934. * Get all of the jobs dispatched synchronously matching a truth-test callback.
  3935. *
  3936. * @param string $command
  3937. * @param callable|null $callback
  3938. * @return \Illuminate\Support\Collection
  3939. * @static
  3940. */
  3941. public static function dispatchedSync($command, $callback = null)
  3942. {
  3943. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3944. return $instance->dispatchedSync($command, $callback);
  3945. }
  3946. /**
  3947. * Get all of the jobs dispatched after the response was sent matching a truth-test callback.
  3948. *
  3949. * @param string $command
  3950. * @param callable|null $callback
  3951. * @return \Illuminate\Support\Collection
  3952. * @static
  3953. */
  3954. public static function dispatchedAfterResponse($command, $callback = null)
  3955. {
  3956. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3957. return $instance->dispatchedAfterResponse($command, $callback);
  3958. }
  3959. /**
  3960. * Get all of the pending batches matching a truth-test callback.
  3961. *
  3962. * @param callable $callback
  3963. * @return \Illuminate\Support\Collection
  3964. * @static
  3965. */
  3966. public static function batched($callback)
  3967. {
  3968. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3969. return $instance->batched($callback);
  3970. }
  3971. /**
  3972. * Determine if there are any stored commands for a given class.
  3973. *
  3974. * @param string $command
  3975. * @return bool
  3976. * @static
  3977. */
  3978. public static function hasDispatched($command)
  3979. {
  3980. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3981. return $instance->hasDispatched($command);
  3982. }
  3983. /**
  3984. * Determine if there are any stored commands for a given class.
  3985. *
  3986. * @param string $command
  3987. * @return bool
  3988. * @static
  3989. */
  3990. public static function hasDispatchedSync($command)
  3991. {
  3992. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3993. return $instance->hasDispatchedSync($command);
  3994. }
  3995. /**
  3996. * Determine if there are any stored commands for a given class.
  3997. *
  3998. * @param string $command
  3999. * @return bool
  4000. * @static
  4001. */
  4002. public static function hasDispatchedAfterResponse($command)
  4003. {
  4004. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4005. return $instance->hasDispatchedAfterResponse($command);
  4006. }
  4007. /**
  4008. * Dispatch an empty job batch for testing.
  4009. *
  4010. * @param string $name
  4011. * @return \Illuminate\Bus\Batch
  4012. * @static
  4013. */
  4014. public static function dispatchFakeBatch($name = '')
  4015. {
  4016. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4017. return $instance->dispatchFakeBatch($name);
  4018. }
  4019. /**
  4020. * Record the fake pending batch dispatch.
  4021. *
  4022. * @param \Illuminate\Bus\PendingBatch $pendingBatch
  4023. * @return \Illuminate\Bus\Batch
  4024. * @static
  4025. */
  4026. public static function recordPendingBatch($pendingBatch)
  4027. {
  4028. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4029. return $instance->recordPendingBatch($pendingBatch);
  4030. }
  4031. /**
  4032. * Specify if commands should be serialized and restored when being batched.
  4033. *
  4034. * @param bool $serializeAndRestore
  4035. * @return \Illuminate\Support\Testing\Fakes\BusFake
  4036. * @static
  4037. */
  4038. public static function serializeAndRestore($serializeAndRestore = true)
  4039. {
  4040. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4041. return $instance->serializeAndRestore($serializeAndRestore);
  4042. }
  4043. /**
  4044. * Get the batches that have been dispatched.
  4045. *
  4046. * @return array
  4047. * @static
  4048. */
  4049. public static function dispatchedBatches()
  4050. {
  4051. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4052. return $instance->dispatchedBatches();
  4053. }
  4054. }
  4055. /**
  4056. * @see \Illuminate\Cache\CacheManager
  4057. * @see \Illuminate\Cache\Repository
  4058. */
  4059. class Cache {
  4060. /**
  4061. * Get a cache store instance by name, wrapped in a repository.
  4062. *
  4063. * @param string|null $name
  4064. * @return \Illuminate\Contracts\Cache\Repository
  4065. * @static
  4066. */
  4067. public static function store($name = null)
  4068. {
  4069. /** @var \Illuminate\Cache\CacheManager $instance */
  4070. return $instance->store($name);
  4071. }
  4072. /**
  4073. * Get a cache driver instance.
  4074. *
  4075. * @param string|null $driver
  4076. * @return \Illuminate\Contracts\Cache\Repository
  4077. * @static
  4078. */
  4079. public static function driver($driver = null)
  4080. {
  4081. /** @var \Illuminate\Cache\CacheManager $instance */
  4082. return $instance->driver($driver);
  4083. }
  4084. /**
  4085. * Get a memoized cache driver instance.
  4086. *
  4087. * @param string|null $driver
  4088. * @return \Illuminate\Contracts\Cache\Repository
  4089. * @static
  4090. */
  4091. public static function memo($driver = null)
  4092. {
  4093. /** @var \Illuminate\Cache\CacheManager $instance */
  4094. return $instance->memo($driver);
  4095. }
  4096. /**
  4097. * Resolve the given store.
  4098. *
  4099. * @param string $name
  4100. * @return \Illuminate\Contracts\Cache\Repository
  4101. * @throws \InvalidArgumentException
  4102. * @static
  4103. */
  4104. public static function resolve($name)
  4105. {
  4106. /** @var \Illuminate\Cache\CacheManager $instance */
  4107. return $instance->resolve($name);
  4108. }
  4109. /**
  4110. * Build a cache repository with the given configuration.
  4111. *
  4112. * @param array $config
  4113. * @return \Illuminate\Cache\Repository
  4114. * @static
  4115. */
  4116. public static function build($config)
  4117. {
  4118. /** @var \Illuminate\Cache\CacheManager $instance */
  4119. return $instance->build($config);
  4120. }
  4121. /**
  4122. * Create a new cache repository with the given implementation.
  4123. *
  4124. * @param \Illuminate\Contracts\Cache\Store $store
  4125. * @param array $config
  4126. * @return \Illuminate\Cache\Repository
  4127. * @static
  4128. */
  4129. public static function repository($store, $config = [])
  4130. {
  4131. /** @var \Illuminate\Cache\CacheManager $instance */
  4132. return $instance->repository($store, $config);
  4133. }
  4134. /**
  4135. * Re-set the event dispatcher on all resolved cache repositories.
  4136. *
  4137. * @return void
  4138. * @static
  4139. */
  4140. public static function refreshEventDispatcher()
  4141. {
  4142. /** @var \Illuminate\Cache\CacheManager $instance */
  4143. $instance->refreshEventDispatcher();
  4144. }
  4145. /**
  4146. * Get the default cache driver name.
  4147. *
  4148. * @return string
  4149. * @static
  4150. */
  4151. public static function getDefaultDriver()
  4152. {
  4153. /** @var \Illuminate\Cache\CacheManager $instance */
  4154. return $instance->getDefaultDriver();
  4155. }
  4156. /**
  4157. * Set the default cache driver name.
  4158. *
  4159. * @param string $name
  4160. * @return void
  4161. * @static
  4162. */
  4163. public static function setDefaultDriver($name)
  4164. {
  4165. /** @var \Illuminate\Cache\CacheManager $instance */
  4166. $instance->setDefaultDriver($name);
  4167. }
  4168. /**
  4169. * Unset the given driver instances.
  4170. *
  4171. * @param array|string|null $name
  4172. * @return \Illuminate\Cache\CacheManager
  4173. * @static
  4174. */
  4175. public static function forgetDriver($name = null)
  4176. {
  4177. /** @var \Illuminate\Cache\CacheManager $instance */
  4178. return $instance->forgetDriver($name);
  4179. }
  4180. /**
  4181. * Disconnect the given driver and remove from local cache.
  4182. *
  4183. * @param string|null $name
  4184. * @return void
  4185. * @static
  4186. */
  4187. public static function purge($name = null)
  4188. {
  4189. /** @var \Illuminate\Cache\CacheManager $instance */
  4190. $instance->purge($name);
  4191. }
  4192. /**
  4193. * Register a custom driver creator Closure.
  4194. *
  4195. * @param string $driver
  4196. * @param \Closure $callback
  4197. * @param-closure-this $this $callback
  4198. * @return \Illuminate\Cache\CacheManager
  4199. * @static
  4200. */
  4201. public static function extend($driver, $callback)
  4202. {
  4203. /** @var \Illuminate\Cache\CacheManager $instance */
  4204. return $instance->extend($driver, $callback);
  4205. }
  4206. /**
  4207. * Set the application instance used by the manager.
  4208. *
  4209. * @param \Illuminate\Contracts\Foundation\Application $app
  4210. * @return \Illuminate\Cache\CacheManager
  4211. * @static
  4212. */
  4213. public static function setApplication($app)
  4214. {
  4215. /** @var \Illuminate\Cache\CacheManager $instance */
  4216. return $instance->setApplication($app);
  4217. }
  4218. /**
  4219. * Determine if an item exists in the cache.
  4220. *
  4221. * @param array|string $key
  4222. * @return bool
  4223. * @static
  4224. */
  4225. public static function has($key)
  4226. {
  4227. /** @var \Illuminate\Cache\Repository $instance */
  4228. return $instance->has($key);
  4229. }
  4230. /**
  4231. * Determine if an item doesn't exist in the cache.
  4232. *
  4233. * @param string $key
  4234. * @return bool
  4235. * @static
  4236. */
  4237. public static function missing($key)
  4238. {
  4239. /** @var \Illuminate\Cache\Repository $instance */
  4240. return $instance->missing($key);
  4241. }
  4242. /**
  4243. * Retrieve an item from the cache by key.
  4244. *
  4245. * @param array|string $key
  4246. * @param mixed $default
  4247. * @return mixed
  4248. * @static
  4249. */
  4250. public static function get($key, $default = null)
  4251. {
  4252. /** @var \Illuminate\Cache\Repository $instance */
  4253. return $instance->get($key, $default);
  4254. }
  4255. /**
  4256. * Retrieve multiple items from the cache by key.
  4257. *
  4258. * Items not found in the cache will have a null value.
  4259. *
  4260. * @param array $keys
  4261. * @return array
  4262. * @static
  4263. */
  4264. public static function many($keys)
  4265. {
  4266. /** @var \Illuminate\Cache\Repository $instance */
  4267. return $instance->many($keys);
  4268. }
  4269. /**
  4270. * Obtains multiple cache items by their unique keys.
  4271. *
  4272. * @return iterable
  4273. * @param iterable<string> $keys A list of keys that can be obtained in a single operation.
  4274. * @param mixed $default Default value to return for keys that do not exist.
  4275. * @return iterable<string, mixed> A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
  4276. * @throws \Psr\SimpleCache\InvalidArgumentException
  4277. * MUST be thrown if $keys is neither an array nor a Traversable,
  4278. * or if any of the $keys are not a legal value.
  4279. * @static
  4280. */
  4281. public static function getMultiple($keys, $default = null)
  4282. {
  4283. /** @var \Illuminate\Cache\Repository $instance */
  4284. return $instance->getMultiple($keys, $default);
  4285. }
  4286. /**
  4287. * Retrieve an item from the cache and delete it.
  4288. *
  4289. * @param array|string $key
  4290. * @param mixed $default
  4291. * @return mixed
  4292. * @static
  4293. */
  4294. public static function pull($key, $default = null)
  4295. {
  4296. /** @var \Illuminate\Cache\Repository $instance */
  4297. return $instance->pull($key, $default);
  4298. }
  4299. /**
  4300. * Store an item in the cache.
  4301. *
  4302. * @param array|string $key
  4303. * @param mixed $value
  4304. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  4305. * @return bool
  4306. * @static
  4307. */
  4308. public static function put($key, $value, $ttl = null)
  4309. {
  4310. /** @var \Illuminate\Cache\Repository $instance */
  4311. return $instance->put($key, $value, $ttl);
  4312. }
  4313. /**
  4314. * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
  4315. *
  4316. * @return bool
  4317. * @param string $key The key of the item to store.
  4318. * @param mixed $value The value of the item to store, must be serializable.
  4319. * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
  4320. * the driver supports TTL then the library may set a default value
  4321. * for it or let the driver take care of that.
  4322. * @return bool True on success and false on failure.
  4323. * @throws \Psr\SimpleCache\InvalidArgumentException
  4324. * MUST be thrown if the $key string is not a legal value.
  4325. * @static
  4326. */
  4327. public static function set($key, $value, $ttl = null)
  4328. {
  4329. /** @var \Illuminate\Cache\Repository $instance */
  4330. return $instance->set($key, $value, $ttl);
  4331. }
  4332. /**
  4333. * Store multiple items in the cache for a given number of seconds.
  4334. *
  4335. * @param array $values
  4336. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  4337. * @return bool
  4338. * @static
  4339. */
  4340. public static function putMany($values, $ttl = null)
  4341. {
  4342. /** @var \Illuminate\Cache\Repository $instance */
  4343. return $instance->putMany($values, $ttl);
  4344. }
  4345. /**
  4346. * Persists a set of key => value pairs in the cache, with an optional TTL.
  4347. *
  4348. * @return bool
  4349. * @param iterable $values A list of key => value pairs for a multiple-set operation.
  4350. * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
  4351. * the driver supports TTL then the library may set a default value
  4352. * for it or let the driver take care of that.
  4353. * @return bool True on success and false on failure.
  4354. * @throws \Psr\SimpleCache\InvalidArgumentException
  4355. * MUST be thrown if $values is neither an array nor a Traversable,
  4356. * or if any of the $values are not a legal value.
  4357. * @static
  4358. */
  4359. public static function setMultiple($values, $ttl = null)
  4360. {
  4361. /** @var \Illuminate\Cache\Repository $instance */
  4362. return $instance->setMultiple($values, $ttl);
  4363. }
  4364. /**
  4365. * Store an item in the cache if the key does not exist.
  4366. *
  4367. * @param string $key
  4368. * @param mixed $value
  4369. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  4370. * @return bool
  4371. * @static
  4372. */
  4373. public static function add($key, $value, $ttl = null)
  4374. {
  4375. /** @var \Illuminate\Cache\Repository $instance */
  4376. return $instance->add($key, $value, $ttl);
  4377. }
  4378. /**
  4379. * Increment the value of an item in the cache.
  4380. *
  4381. * @param string $key
  4382. * @param mixed $value
  4383. * @return int|bool
  4384. * @static
  4385. */
  4386. public static function increment($key, $value = 1)
  4387. {
  4388. /** @var \Illuminate\Cache\Repository $instance */
  4389. return $instance->increment($key, $value);
  4390. }
  4391. /**
  4392. * Decrement the value of an item in the cache.
  4393. *
  4394. * @param string $key
  4395. * @param mixed $value
  4396. * @return int|bool
  4397. * @static
  4398. */
  4399. public static function decrement($key, $value = 1)
  4400. {
  4401. /** @var \Illuminate\Cache\Repository $instance */
  4402. return $instance->decrement($key, $value);
  4403. }
  4404. /**
  4405. * Store an item in the cache indefinitely.
  4406. *
  4407. * @param string $key
  4408. * @param mixed $value
  4409. * @return bool
  4410. * @static
  4411. */
  4412. public static function forever($key, $value)
  4413. {
  4414. /** @var \Illuminate\Cache\Repository $instance */
  4415. return $instance->forever($key, $value);
  4416. }
  4417. /**
  4418. * Get an item from the cache, or execute the given Closure and store the result.
  4419. *
  4420. * @template TCacheValue
  4421. * @param string $key
  4422. * @param \Closure|\DateTimeInterface|\DateInterval|int|null $ttl
  4423. * @param \Closure(): TCacheValue $callback
  4424. * @return TCacheValue
  4425. * @static
  4426. */
  4427. public static function remember($key, $ttl, $callback)
  4428. {
  4429. /** @var \Illuminate\Cache\Repository $instance */
  4430. return $instance->remember($key, $ttl, $callback);
  4431. }
  4432. /**
  4433. * Get an item from the cache, or execute the given Closure and store the result forever.
  4434. *
  4435. * @template TCacheValue
  4436. * @param string $key
  4437. * @param \Closure(): TCacheValue $callback
  4438. * @return TCacheValue
  4439. * @static
  4440. */
  4441. public static function sear($key, $callback)
  4442. {
  4443. /** @var \Illuminate\Cache\Repository $instance */
  4444. return $instance->sear($key, $callback);
  4445. }
  4446. /**
  4447. * Get an item from the cache, or execute the given Closure and store the result forever.
  4448. *
  4449. * @template TCacheValue
  4450. * @param string $key
  4451. * @param \Closure(): TCacheValue $callback
  4452. * @return TCacheValue
  4453. * @static
  4454. */
  4455. public static function rememberForever($key, $callback)
  4456. {
  4457. /** @var \Illuminate\Cache\Repository $instance */
  4458. return $instance->rememberForever($key, $callback);
  4459. }
  4460. /**
  4461. * Retrieve an item from the cache by key, refreshing it in the background if it is stale.
  4462. *
  4463. * @template TCacheValue
  4464. * @param string $key
  4465. * @param array{ 0: \DateTimeInterface|\DateInterval|int, 1: \DateTimeInterface|\DateInterval|int } $ttl
  4466. * @param (callable(): TCacheValue) $callback
  4467. * @param array{ seconds?: int, owner?: string }|null $lock
  4468. * @param bool $alwaysDefer
  4469. * @return TCacheValue
  4470. * @static
  4471. */
  4472. public static function flexible($key, $ttl, $callback, $lock = null, $alwaysDefer = false)
  4473. {
  4474. /** @var \Illuminate\Cache\Repository $instance */
  4475. return $instance->flexible($key, $ttl, $callback, $lock, $alwaysDefer);
  4476. }
  4477. /**
  4478. * Remove an item from the cache.
  4479. *
  4480. * @param string $key
  4481. * @return bool
  4482. * @static
  4483. */
  4484. public static function forget($key)
  4485. {
  4486. /** @var \Illuminate\Cache\Repository $instance */
  4487. return $instance->forget($key);
  4488. }
  4489. /**
  4490. * Delete an item from the cache by its unique key.
  4491. *
  4492. * @return bool
  4493. * @param string $key The unique cache key of the item to delete.
  4494. * @return bool True if the item was successfully removed. False if there was an error.
  4495. * @throws \Psr\SimpleCache\InvalidArgumentException
  4496. * MUST be thrown if the $key string is not a legal value.
  4497. * @static
  4498. */
  4499. public static function delete($key)
  4500. {
  4501. /** @var \Illuminate\Cache\Repository $instance */
  4502. return $instance->delete($key);
  4503. }
  4504. /**
  4505. * Deletes multiple cache items in a single operation.
  4506. *
  4507. * @return bool
  4508. * @param iterable<string> $keys A list of string-based keys to be deleted.
  4509. * @return bool True if the items were successfully removed. False if there was an error.
  4510. * @throws \Psr\SimpleCache\InvalidArgumentException
  4511. * MUST be thrown if $keys is neither an array nor a Traversable,
  4512. * or if any of the $keys are not a legal value.
  4513. * @static
  4514. */
  4515. public static function deleteMultiple($keys)
  4516. {
  4517. /** @var \Illuminate\Cache\Repository $instance */
  4518. return $instance->deleteMultiple($keys);
  4519. }
  4520. /**
  4521. * Wipes clean the entire cache's keys.
  4522. *
  4523. * @return bool
  4524. * @return bool True on success and false on failure.
  4525. * @static
  4526. */
  4527. public static function clear()
  4528. {
  4529. /** @var \Illuminate\Cache\Repository $instance */
  4530. return $instance->clear();
  4531. }
  4532. /**
  4533. * Begin executing a new tags operation if the store supports it.
  4534. *
  4535. * @param array|mixed $names
  4536. * @return \Illuminate\Cache\TaggedCache
  4537. * @throws \BadMethodCallException
  4538. * @static
  4539. */
  4540. public static function tags($names)
  4541. {
  4542. /** @var \Illuminate\Cache\Repository $instance */
  4543. return $instance->tags($names);
  4544. }
  4545. /**
  4546. * Get the name of the cache store.
  4547. *
  4548. * @return string|null
  4549. * @static
  4550. */
  4551. public static function getName()
  4552. {
  4553. /** @var \Illuminate\Cache\Repository $instance */
  4554. return $instance->getName();
  4555. }
  4556. /**
  4557. * Determine if the current store supports tags.
  4558. *
  4559. * @return bool
  4560. * @static
  4561. */
  4562. public static function supportsTags()
  4563. {
  4564. /** @var \Illuminate\Cache\Repository $instance */
  4565. return $instance->supportsTags();
  4566. }
  4567. /**
  4568. * Get the default cache time.
  4569. *
  4570. * @return int|null
  4571. * @static
  4572. */
  4573. public static function getDefaultCacheTime()
  4574. {
  4575. /** @var \Illuminate\Cache\Repository $instance */
  4576. return $instance->getDefaultCacheTime();
  4577. }
  4578. /**
  4579. * Set the default cache time in seconds.
  4580. *
  4581. * @param int|null $seconds
  4582. * @return \Illuminate\Cache\Repository
  4583. * @static
  4584. */
  4585. public static function setDefaultCacheTime($seconds)
  4586. {
  4587. /** @var \Illuminate\Cache\Repository $instance */
  4588. return $instance->setDefaultCacheTime($seconds);
  4589. }
  4590. /**
  4591. * Get the cache store implementation.
  4592. *
  4593. * @return \Illuminate\Contracts\Cache\Store
  4594. * @static
  4595. */
  4596. public static function getStore()
  4597. {
  4598. /** @var \Illuminate\Cache\Repository $instance */
  4599. return $instance->getStore();
  4600. }
  4601. /**
  4602. * Set the cache store implementation.
  4603. *
  4604. * @param \Illuminate\Contracts\Cache\Store $store
  4605. * @return static
  4606. * @static
  4607. */
  4608. public static function setStore($store)
  4609. {
  4610. /** @var \Illuminate\Cache\Repository $instance */
  4611. return $instance->setStore($store);
  4612. }
  4613. /**
  4614. * Get the event dispatcher instance.
  4615. *
  4616. * @return \Illuminate\Contracts\Events\Dispatcher|null
  4617. * @static
  4618. */
  4619. public static function getEventDispatcher()
  4620. {
  4621. /** @var \Illuminate\Cache\Repository $instance */
  4622. return $instance->getEventDispatcher();
  4623. }
  4624. /**
  4625. * Set the event dispatcher instance.
  4626. *
  4627. * @param \Illuminate\Contracts\Events\Dispatcher $events
  4628. * @return void
  4629. * @static
  4630. */
  4631. public static function setEventDispatcher($events)
  4632. {
  4633. /** @var \Illuminate\Cache\Repository $instance */
  4634. $instance->setEventDispatcher($events);
  4635. }
  4636. /**
  4637. * Determine if a cached value exists.
  4638. *
  4639. * @param string $key
  4640. * @return bool
  4641. * @static
  4642. */
  4643. public static function offsetExists($key)
  4644. {
  4645. /** @var \Illuminate\Cache\Repository $instance */
  4646. return $instance->offsetExists($key);
  4647. }
  4648. /**
  4649. * Retrieve an item from the cache by key.
  4650. *
  4651. * @param string $key
  4652. * @return mixed
  4653. * @static
  4654. */
  4655. public static function offsetGet($key)
  4656. {
  4657. /** @var \Illuminate\Cache\Repository $instance */
  4658. return $instance->offsetGet($key);
  4659. }
  4660. /**
  4661. * Store an item in the cache for the default time.
  4662. *
  4663. * @param string $key
  4664. * @param mixed $value
  4665. * @return void
  4666. * @static
  4667. */
  4668. public static function offsetSet($key, $value)
  4669. {
  4670. /** @var \Illuminate\Cache\Repository $instance */
  4671. $instance->offsetSet($key, $value);
  4672. }
  4673. /**
  4674. * Remove an item from the cache.
  4675. *
  4676. * @param string $key
  4677. * @return void
  4678. * @static
  4679. */
  4680. public static function offsetUnset($key)
  4681. {
  4682. /** @var \Illuminate\Cache\Repository $instance */
  4683. $instance->offsetUnset($key);
  4684. }
  4685. /**
  4686. * Register a custom macro.
  4687. *
  4688. * @param string $name
  4689. * @param object|callable $macro
  4690. * @param-closure-this static $macro
  4691. * @return void
  4692. * @static
  4693. */
  4694. public static function macro($name, $macro)
  4695. {
  4696. \Illuminate\Cache\Repository::macro($name, $macro);
  4697. }
  4698. /**
  4699. * Mix another object into the class.
  4700. *
  4701. * @param object $mixin
  4702. * @param bool $replace
  4703. * @return void
  4704. * @throws \ReflectionException
  4705. * @static
  4706. */
  4707. public static function mixin($mixin, $replace = true)
  4708. {
  4709. \Illuminate\Cache\Repository::mixin($mixin, $replace);
  4710. }
  4711. /**
  4712. * Checks if macro is registered.
  4713. *
  4714. * @param string $name
  4715. * @return bool
  4716. * @static
  4717. */
  4718. public static function hasMacro($name)
  4719. {
  4720. return \Illuminate\Cache\Repository::hasMacro($name);
  4721. }
  4722. /**
  4723. * Flush the existing macros.
  4724. *
  4725. * @return void
  4726. * @static
  4727. */
  4728. public static function flushMacros()
  4729. {
  4730. \Illuminate\Cache\Repository::flushMacros();
  4731. }
  4732. /**
  4733. * Dynamically handle calls to the class.
  4734. *
  4735. * @param string $method
  4736. * @param array $parameters
  4737. * @return mixed
  4738. * @throws \BadMethodCallException
  4739. * @static
  4740. */
  4741. public static function macroCall($method, $parameters)
  4742. {
  4743. /** @var \Illuminate\Cache\Repository $instance */
  4744. return $instance->macroCall($method, $parameters);
  4745. }
  4746. /**
  4747. * Get a lock instance.
  4748. *
  4749. * @param string $name
  4750. * @param int $seconds
  4751. * @param string|null $owner
  4752. * @return \Illuminate\Contracts\Cache\Lock
  4753. * @static
  4754. */
  4755. public static function lock($name, $seconds = 0, $owner = null)
  4756. {
  4757. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4758. return $instance->lock($name, $seconds, $owner);
  4759. }
  4760. /**
  4761. * Restore a lock instance using the owner identifier.
  4762. *
  4763. * @param string $name
  4764. * @param string $owner
  4765. * @return \Illuminate\Contracts\Cache\Lock
  4766. * @static
  4767. */
  4768. public static function restoreLock($name, $owner)
  4769. {
  4770. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4771. return $instance->restoreLock($name, $owner);
  4772. }
  4773. /**
  4774. * Remove an item from the cache if it is expired.
  4775. *
  4776. * @param string $key
  4777. * @return bool
  4778. * @static
  4779. */
  4780. public static function forgetIfExpired($key)
  4781. {
  4782. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4783. return $instance->forgetIfExpired($key);
  4784. }
  4785. /**
  4786. * Remove all items from the cache.
  4787. *
  4788. * @return bool
  4789. * @static
  4790. */
  4791. public static function flush()
  4792. {
  4793. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4794. return $instance->flush();
  4795. }
  4796. /**
  4797. * Get the underlying database connection.
  4798. *
  4799. * @return \Illuminate\Database\PostgresConnection
  4800. * @static
  4801. */
  4802. public static function getConnection()
  4803. {
  4804. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4805. return $instance->getConnection();
  4806. }
  4807. /**
  4808. * Specify the name of the connection that should be used to manage locks.
  4809. *
  4810. * @param \Illuminate\Database\ConnectionInterface $connection
  4811. * @return \Illuminate\Cache\DatabaseStore
  4812. * @static
  4813. */
  4814. public static function setLockConnection($connection)
  4815. {
  4816. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4817. return $instance->setLockConnection($connection);
  4818. }
  4819. /**
  4820. * Get the cache key prefix.
  4821. *
  4822. * @return string
  4823. * @static
  4824. */
  4825. public static function getPrefix()
  4826. {
  4827. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4828. return $instance->getPrefix();
  4829. }
  4830. /**
  4831. * Set the cache key prefix.
  4832. *
  4833. * @param string $prefix
  4834. * @return void
  4835. * @static
  4836. */
  4837. public static function setPrefix($prefix)
  4838. {
  4839. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4840. $instance->setPrefix($prefix);
  4841. }
  4842. }
  4843. /**
  4844. * @method static array run(\Closure|array $tasks)
  4845. * @method static \Illuminate\Support\Defer\DeferredCallback defer(\Closure|array $tasks)
  4846. * @see \Illuminate\Concurrency\ConcurrencyManager
  4847. */
  4848. class Concurrency {
  4849. /**
  4850. * Get a driver instance by name.
  4851. *
  4852. * @param string|null $name
  4853. * @return mixed
  4854. * @static
  4855. */
  4856. public static function driver($name = null)
  4857. {
  4858. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4859. return $instance->driver($name);
  4860. }
  4861. /**
  4862. * Create an instance of the process concurrency driver.
  4863. *
  4864. * @param array $config
  4865. * @return \Illuminate\Concurrency\ProcessDriver
  4866. * @static
  4867. */
  4868. public static function createProcessDriver($config)
  4869. {
  4870. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4871. return $instance->createProcessDriver($config);
  4872. }
  4873. /**
  4874. * Create an instance of the fork concurrency driver.
  4875. *
  4876. * @param array $config
  4877. * @return \Illuminate\Concurrency\ForkDriver
  4878. * @throws \RuntimeException
  4879. * @static
  4880. */
  4881. public static function createForkDriver($config)
  4882. {
  4883. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4884. return $instance->createForkDriver($config);
  4885. }
  4886. /**
  4887. * Create an instance of the sync concurrency driver.
  4888. *
  4889. * @param array $config
  4890. * @return \Illuminate\Concurrency\SyncDriver
  4891. * @static
  4892. */
  4893. public static function createSyncDriver($config)
  4894. {
  4895. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4896. return $instance->createSyncDriver($config);
  4897. }
  4898. /**
  4899. * Get the default instance name.
  4900. *
  4901. * @return string
  4902. * @static
  4903. */
  4904. public static function getDefaultInstance()
  4905. {
  4906. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4907. return $instance->getDefaultInstance();
  4908. }
  4909. /**
  4910. * Set the default instance name.
  4911. *
  4912. * @param string $name
  4913. * @return void
  4914. * @static
  4915. */
  4916. public static function setDefaultInstance($name)
  4917. {
  4918. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4919. $instance->setDefaultInstance($name);
  4920. }
  4921. /**
  4922. * Get the instance specific configuration.
  4923. *
  4924. * @param string $name
  4925. * @return array
  4926. * @static
  4927. */
  4928. public static function getInstanceConfig($name)
  4929. {
  4930. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4931. return $instance->getInstanceConfig($name);
  4932. }
  4933. /**
  4934. * Get an instance by name.
  4935. *
  4936. * @param string|null $name
  4937. * @return mixed
  4938. * @static
  4939. */
  4940. public static function instance($name = null)
  4941. {
  4942. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4943. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4944. return $instance->instance($name);
  4945. }
  4946. /**
  4947. * Unset the given instances.
  4948. *
  4949. * @param array|string|null $name
  4950. * @return \Illuminate\Concurrency\ConcurrencyManager
  4951. * @static
  4952. */
  4953. public static function forgetInstance($name = null)
  4954. {
  4955. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4956. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4957. return $instance->forgetInstance($name);
  4958. }
  4959. /**
  4960. * Disconnect the given instance and remove from local cache.
  4961. *
  4962. * @param string|null $name
  4963. * @return void
  4964. * @static
  4965. */
  4966. public static function purge($name = null)
  4967. {
  4968. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4969. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4970. $instance->purge($name);
  4971. }
  4972. /**
  4973. * Register a custom instance creator Closure.
  4974. *
  4975. * @param string $name
  4976. * @param \Closure $callback
  4977. * @param-closure-this $this $callback
  4978. * @return \Illuminate\Concurrency\ConcurrencyManager
  4979. * @static
  4980. */
  4981. public static function extend($name, $callback)
  4982. {
  4983. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4984. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4985. return $instance->extend($name, $callback);
  4986. }
  4987. /**
  4988. * Set the application instance used by the manager.
  4989. *
  4990. * @param \Illuminate\Contracts\Foundation\Application $app
  4991. * @return \Illuminate\Concurrency\ConcurrencyManager
  4992. * @static
  4993. */
  4994. public static function setApplication($app)
  4995. {
  4996. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4997. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4998. return $instance->setApplication($app);
  4999. }
  5000. }
  5001. /**
  5002. * @see \Illuminate\Config\Repository
  5003. */
  5004. class Config {
  5005. /**
  5006. * Determine if the given configuration value exists.
  5007. *
  5008. * @param string $key
  5009. * @return bool
  5010. * @static
  5011. */
  5012. public static function has($key)
  5013. {
  5014. /** @var \Illuminate\Config\Repository $instance */
  5015. return $instance->has($key);
  5016. }
  5017. /**
  5018. * Get the specified configuration value.
  5019. *
  5020. * @param array|string $key
  5021. * @param mixed $default
  5022. * @return mixed
  5023. * @static
  5024. */
  5025. public static function get($key, $default = null)
  5026. {
  5027. /** @var \Illuminate\Config\Repository $instance */
  5028. return $instance->get($key, $default);
  5029. }
  5030. /**
  5031. * Get many configuration values.
  5032. *
  5033. * @param array<string|int,mixed> $keys
  5034. * @return array<string,mixed>
  5035. * @static
  5036. */
  5037. public static function getMany($keys)
  5038. {
  5039. /** @var \Illuminate\Config\Repository $instance */
  5040. return $instance->getMany($keys);
  5041. }
  5042. /**
  5043. * Get the specified string configuration value.
  5044. *
  5045. * @param string $key
  5046. * @param (\Closure():(string|null))|string|null $default
  5047. * @return string
  5048. * @static
  5049. */
  5050. public static function string($key, $default = null)
  5051. {
  5052. /** @var \Illuminate\Config\Repository $instance */
  5053. return $instance->string($key, $default);
  5054. }
  5055. /**
  5056. * Get the specified integer configuration value.
  5057. *
  5058. * @param string $key
  5059. * @param (\Closure():(int|null))|int|null $default
  5060. * @return int
  5061. * @static
  5062. */
  5063. public static function integer($key, $default = null)
  5064. {
  5065. /** @var \Illuminate\Config\Repository $instance */
  5066. return $instance->integer($key, $default);
  5067. }
  5068. /**
  5069. * Get the specified float configuration value.
  5070. *
  5071. * @param string $key
  5072. * @param (\Closure():(float|null))|float|null $default
  5073. * @return float
  5074. * @static
  5075. */
  5076. public static function float($key, $default = null)
  5077. {
  5078. /** @var \Illuminate\Config\Repository $instance */
  5079. return $instance->float($key, $default);
  5080. }
  5081. /**
  5082. * Get the specified boolean configuration value.
  5083. *
  5084. * @param string $key
  5085. * @param (\Closure():(bool|null))|bool|null $default
  5086. * @return bool
  5087. * @static
  5088. */
  5089. public static function boolean($key, $default = null)
  5090. {
  5091. /** @var \Illuminate\Config\Repository $instance */
  5092. return $instance->boolean($key, $default);
  5093. }
  5094. /**
  5095. * Get the specified array configuration value.
  5096. *
  5097. * @param string $key
  5098. * @param (\Closure():(array<array-key, mixed>|null))|array<array-key, mixed>|null $default
  5099. * @return array<array-key, mixed>
  5100. * @static
  5101. */
  5102. public static function array($key, $default = null)
  5103. {
  5104. /** @var \Illuminate\Config\Repository $instance */
  5105. return $instance->array($key, $default);
  5106. }
  5107. /**
  5108. * Get the specified array configuration value as a collection.
  5109. *
  5110. * @param string $key
  5111. * @param (\Closure():(array<array-key, mixed>|null))|array<array-key, mixed>|null $default
  5112. * @return Collection<array-key, mixed>
  5113. * @static
  5114. */
  5115. public static function collection($key, $default = null)
  5116. {
  5117. /** @var \Illuminate\Config\Repository $instance */
  5118. return $instance->collection($key, $default);
  5119. }
  5120. /**
  5121. * Set a given configuration value.
  5122. *
  5123. * @param array|string $key
  5124. * @param mixed $value
  5125. * @return void
  5126. * @static
  5127. */
  5128. public static function set($key, $value = null)
  5129. {
  5130. /** @var \Illuminate\Config\Repository $instance */
  5131. $instance->set($key, $value);
  5132. }
  5133. /**
  5134. * Prepend a value onto an array configuration value.
  5135. *
  5136. * @param string $key
  5137. * @param mixed $value
  5138. * @return void
  5139. * @static
  5140. */
  5141. public static function prepend($key, $value)
  5142. {
  5143. /** @var \Illuminate\Config\Repository $instance */
  5144. $instance->prepend($key, $value);
  5145. }
  5146. /**
  5147. * Push a value onto an array configuration value.
  5148. *
  5149. * @param string $key
  5150. * @param mixed $value
  5151. * @return void
  5152. * @static
  5153. */
  5154. public static function push($key, $value)
  5155. {
  5156. /** @var \Illuminate\Config\Repository $instance */
  5157. $instance->push($key, $value);
  5158. }
  5159. /**
  5160. * Get all of the configuration items for the application.
  5161. *
  5162. * @return array
  5163. * @static
  5164. */
  5165. public static function all()
  5166. {
  5167. /** @var \Illuminate\Config\Repository $instance */
  5168. return $instance->all();
  5169. }
  5170. /**
  5171. * Determine if the given configuration option exists.
  5172. *
  5173. * @param string $key
  5174. * @return bool
  5175. * @static
  5176. */
  5177. public static function offsetExists($key)
  5178. {
  5179. /** @var \Illuminate\Config\Repository $instance */
  5180. return $instance->offsetExists($key);
  5181. }
  5182. /**
  5183. * Get a configuration option.
  5184. *
  5185. * @param string $key
  5186. * @return mixed
  5187. * @static
  5188. */
  5189. public static function offsetGet($key)
  5190. {
  5191. /** @var \Illuminate\Config\Repository $instance */
  5192. return $instance->offsetGet($key);
  5193. }
  5194. /**
  5195. * Set a configuration option.
  5196. *
  5197. * @param string $key
  5198. * @param mixed $value
  5199. * @return void
  5200. * @static
  5201. */
  5202. public static function offsetSet($key, $value)
  5203. {
  5204. /** @var \Illuminate\Config\Repository $instance */
  5205. $instance->offsetSet($key, $value);
  5206. }
  5207. /**
  5208. * Unset a configuration option.
  5209. *
  5210. * @param string $key
  5211. * @return void
  5212. * @static
  5213. */
  5214. public static function offsetUnset($key)
  5215. {
  5216. /** @var \Illuminate\Config\Repository $instance */
  5217. $instance->offsetUnset($key);
  5218. }
  5219. /**
  5220. * Register a custom macro.
  5221. *
  5222. * @param string $name
  5223. * @param object|callable $macro
  5224. * @param-closure-this static $macro
  5225. * @return void
  5226. * @static
  5227. */
  5228. public static function macro($name, $macro)
  5229. {
  5230. \Illuminate\Config\Repository::macro($name, $macro);
  5231. }
  5232. /**
  5233. * Mix another object into the class.
  5234. *
  5235. * @param object $mixin
  5236. * @param bool $replace
  5237. * @return void
  5238. * @throws \ReflectionException
  5239. * @static
  5240. */
  5241. public static function mixin($mixin, $replace = true)
  5242. {
  5243. \Illuminate\Config\Repository::mixin($mixin, $replace);
  5244. }
  5245. /**
  5246. * Checks if macro is registered.
  5247. *
  5248. * @param string $name
  5249. * @return bool
  5250. * @static
  5251. */
  5252. public static function hasMacro($name)
  5253. {
  5254. return \Illuminate\Config\Repository::hasMacro($name);
  5255. }
  5256. /**
  5257. * Flush the existing macros.
  5258. *
  5259. * @return void
  5260. * @static
  5261. */
  5262. public static function flushMacros()
  5263. {
  5264. \Illuminate\Config\Repository::flushMacros();
  5265. }
  5266. }
  5267. /**
  5268. * @see \Illuminate\Log\Context\Repository
  5269. */
  5270. class Context {
  5271. /**
  5272. * Determine if the given key exists.
  5273. *
  5274. * @param string $key
  5275. * @return bool
  5276. * @static
  5277. */
  5278. public static function has($key)
  5279. {
  5280. /** @var \Illuminate\Log\Context\Repository $instance */
  5281. return $instance->has($key);
  5282. }
  5283. /**
  5284. * Determine if the given key is missing.
  5285. *
  5286. * @param string $key
  5287. * @return bool
  5288. * @static
  5289. */
  5290. public static function missing($key)
  5291. {
  5292. /** @var \Illuminate\Log\Context\Repository $instance */
  5293. return $instance->missing($key);
  5294. }
  5295. /**
  5296. * Determine if the given key exists within the hidden context data.
  5297. *
  5298. * @param string $key
  5299. * @return bool
  5300. * @static
  5301. */
  5302. public static function hasHidden($key)
  5303. {
  5304. /** @var \Illuminate\Log\Context\Repository $instance */
  5305. return $instance->hasHidden($key);
  5306. }
  5307. /**
  5308. * Determine if the given key is missing within the hidden context data.
  5309. *
  5310. * @param string $key
  5311. * @return bool
  5312. * @static
  5313. */
  5314. public static function missingHidden($key)
  5315. {
  5316. /** @var \Illuminate\Log\Context\Repository $instance */
  5317. return $instance->missingHidden($key);
  5318. }
  5319. /**
  5320. * Retrieve all the context data.
  5321. *
  5322. * @return array<string, mixed>
  5323. * @static
  5324. */
  5325. public static function all()
  5326. {
  5327. /** @var \Illuminate\Log\Context\Repository $instance */
  5328. return $instance->all();
  5329. }
  5330. /**
  5331. * Retrieve all the hidden context data.
  5332. *
  5333. * @return array<string, mixed>
  5334. * @static
  5335. */
  5336. public static function allHidden()
  5337. {
  5338. /** @var \Illuminate\Log\Context\Repository $instance */
  5339. return $instance->allHidden();
  5340. }
  5341. /**
  5342. * Retrieve the given key's value.
  5343. *
  5344. * @param string $key
  5345. * @param mixed $default
  5346. * @return mixed
  5347. * @static
  5348. */
  5349. public static function get($key, $default = null)
  5350. {
  5351. /** @var \Illuminate\Log\Context\Repository $instance */
  5352. return $instance->get($key, $default);
  5353. }
  5354. /**
  5355. * Retrieve the given key's hidden value.
  5356. *
  5357. * @param string $key
  5358. * @param mixed $default
  5359. * @return mixed
  5360. * @static
  5361. */
  5362. public static function getHidden($key, $default = null)
  5363. {
  5364. /** @var \Illuminate\Log\Context\Repository $instance */
  5365. return $instance->getHidden($key, $default);
  5366. }
  5367. /**
  5368. * Retrieve the given key's value and then forget it.
  5369. *
  5370. * @param string $key
  5371. * @param mixed $default
  5372. * @return mixed
  5373. * @static
  5374. */
  5375. public static function pull($key, $default = null)
  5376. {
  5377. /** @var \Illuminate\Log\Context\Repository $instance */
  5378. return $instance->pull($key, $default);
  5379. }
  5380. /**
  5381. * Retrieve the given key's hidden value and then forget it.
  5382. *
  5383. * @param string $key
  5384. * @param mixed $default
  5385. * @return mixed
  5386. * @static
  5387. */
  5388. public static function pullHidden($key, $default = null)
  5389. {
  5390. /** @var \Illuminate\Log\Context\Repository $instance */
  5391. return $instance->pullHidden($key, $default);
  5392. }
  5393. /**
  5394. * Retrieve only the values of the given keys.
  5395. *
  5396. * @param array<int, string> $keys
  5397. * @return array<string, mixed>
  5398. * @static
  5399. */
  5400. public static function only($keys)
  5401. {
  5402. /** @var \Illuminate\Log\Context\Repository $instance */
  5403. return $instance->only($keys);
  5404. }
  5405. /**
  5406. * Retrieve only the hidden values of the given keys.
  5407. *
  5408. * @param array<int, string> $keys
  5409. * @return array<string, mixed>
  5410. * @static
  5411. */
  5412. public static function onlyHidden($keys)
  5413. {
  5414. /** @var \Illuminate\Log\Context\Repository $instance */
  5415. return $instance->onlyHidden($keys);
  5416. }
  5417. /**
  5418. * Retrieve all values except those with the given keys.
  5419. *
  5420. * @param array<int, string> $keys
  5421. * @return array<string, mixed>
  5422. * @static
  5423. */
  5424. public static function except($keys)
  5425. {
  5426. /** @var \Illuminate\Log\Context\Repository $instance */
  5427. return $instance->except($keys);
  5428. }
  5429. /**
  5430. * Retrieve all hidden values except those with the given keys.
  5431. *
  5432. * @param array<int, string> $keys
  5433. * @return array<string, mixed>
  5434. * @static
  5435. */
  5436. public static function exceptHidden($keys)
  5437. {
  5438. /** @var \Illuminate\Log\Context\Repository $instance */
  5439. return $instance->exceptHidden($keys);
  5440. }
  5441. /**
  5442. * Add a context value.
  5443. *
  5444. * @param string|array<string, mixed> $key
  5445. * @param mixed $value
  5446. * @return \Illuminate\Log\Context\Repository
  5447. * @static
  5448. */
  5449. public static function add($key, $value = null)
  5450. {
  5451. /** @var \Illuminate\Log\Context\Repository $instance */
  5452. return $instance->add($key, $value);
  5453. }
  5454. /**
  5455. * Add a hidden context value.
  5456. *
  5457. * @param string|array<string, mixed> $key
  5458. * @param mixed $value
  5459. * @return \Illuminate\Log\Context\Repository
  5460. * @static
  5461. */
  5462. public static function addHidden($key, $value = null)
  5463. {
  5464. /** @var \Illuminate\Log\Context\Repository $instance */
  5465. return $instance->addHidden($key, $value);
  5466. }
  5467. /**
  5468. * Add a context value if it does not exist yet, and return the value.
  5469. *
  5470. * @param string $key
  5471. * @param mixed $value
  5472. * @return mixed
  5473. * @static
  5474. */
  5475. public static function remember($key, $value)
  5476. {
  5477. /** @var \Illuminate\Log\Context\Repository $instance */
  5478. return $instance->remember($key, $value);
  5479. }
  5480. /**
  5481. * Add a hidden context value if it does not exist yet, and return the value.
  5482. *
  5483. * @param string $key
  5484. * @param mixed $value
  5485. * @return mixed
  5486. * @static
  5487. */
  5488. public static function rememberHidden($key, $value)
  5489. {
  5490. /** @var \Illuminate\Log\Context\Repository $instance */
  5491. return $instance->rememberHidden($key, $value);
  5492. }
  5493. /**
  5494. * Forget the given context key.
  5495. *
  5496. * @param string|array<int, string> $key
  5497. * @return \Illuminate\Log\Context\Repository
  5498. * @static
  5499. */
  5500. public static function forget($key)
  5501. {
  5502. /** @var \Illuminate\Log\Context\Repository $instance */
  5503. return $instance->forget($key);
  5504. }
  5505. /**
  5506. * Forget the given hidden context key.
  5507. *
  5508. * @param string|array<int, string> $key
  5509. * @return \Illuminate\Log\Context\Repository
  5510. * @static
  5511. */
  5512. public static function forgetHidden($key)
  5513. {
  5514. /** @var \Illuminate\Log\Context\Repository $instance */
  5515. return $instance->forgetHidden($key);
  5516. }
  5517. /**
  5518. * Add a context value if it does not exist yet.
  5519. *
  5520. * @param string $key
  5521. * @param mixed $value
  5522. * @return \Illuminate\Log\Context\Repository
  5523. * @static
  5524. */
  5525. public static function addIf($key, $value)
  5526. {
  5527. /** @var \Illuminate\Log\Context\Repository $instance */
  5528. return $instance->addIf($key, $value);
  5529. }
  5530. /**
  5531. * Add a hidden context value if it does not exist yet.
  5532. *
  5533. * @param string $key
  5534. * @param mixed $value
  5535. * @return \Illuminate\Log\Context\Repository
  5536. * @static
  5537. */
  5538. public static function addHiddenIf($key, $value)
  5539. {
  5540. /** @var \Illuminate\Log\Context\Repository $instance */
  5541. return $instance->addHiddenIf($key, $value);
  5542. }
  5543. /**
  5544. * Push the given values onto the key's stack.
  5545. *
  5546. * @param string $key
  5547. * @param mixed $values
  5548. * @return \Illuminate\Log\Context\Repository
  5549. * @throws \RuntimeException
  5550. * @static
  5551. */
  5552. public static function push($key, ...$values)
  5553. {
  5554. /** @var \Illuminate\Log\Context\Repository $instance */
  5555. return $instance->push($key, ...$values);
  5556. }
  5557. /**
  5558. * Pop the latest value from the key's stack.
  5559. *
  5560. * @param string $key
  5561. * @return mixed
  5562. * @throws \RuntimeException
  5563. * @static
  5564. */
  5565. public static function pop($key)
  5566. {
  5567. /** @var \Illuminate\Log\Context\Repository $instance */
  5568. return $instance->pop($key);
  5569. }
  5570. /**
  5571. * Push the given hidden values onto the key's stack.
  5572. *
  5573. * @param string $key
  5574. * @param mixed $values
  5575. * @return \Illuminate\Log\Context\Repository
  5576. * @throws \RuntimeException
  5577. * @static
  5578. */
  5579. public static function pushHidden($key, ...$values)
  5580. {
  5581. /** @var \Illuminate\Log\Context\Repository $instance */
  5582. return $instance->pushHidden($key, ...$values);
  5583. }
  5584. /**
  5585. * Pop the latest hidden value from the key's stack.
  5586. *
  5587. * @param string $key
  5588. * @return mixed
  5589. * @throws \RuntimeException
  5590. * @static
  5591. */
  5592. public static function popHidden($key)
  5593. {
  5594. /** @var \Illuminate\Log\Context\Repository $instance */
  5595. return $instance->popHidden($key);
  5596. }
  5597. /**
  5598. * Increment a context counter.
  5599. *
  5600. * @param string $key
  5601. * @param int $amount
  5602. * @return \Illuminate\Log\Context\Repository
  5603. * @static
  5604. */
  5605. public static function increment($key, $amount = 1)
  5606. {
  5607. /** @var \Illuminate\Log\Context\Repository $instance */
  5608. return $instance->increment($key, $amount);
  5609. }
  5610. /**
  5611. * Decrement a context counter.
  5612. *
  5613. * @param string $key
  5614. * @param int $amount
  5615. * @return \Illuminate\Log\Context\Repository
  5616. * @static
  5617. */
  5618. public static function decrement($key, $amount = 1)
  5619. {
  5620. /** @var \Illuminate\Log\Context\Repository $instance */
  5621. return $instance->decrement($key, $amount);
  5622. }
  5623. /**
  5624. * Determine if the given value is in the given stack.
  5625. *
  5626. * @param string $key
  5627. * @param mixed $value
  5628. * @param bool $strict
  5629. * @return bool
  5630. * @throws \RuntimeException
  5631. * @static
  5632. */
  5633. public static function stackContains($key, $value, $strict = false)
  5634. {
  5635. /** @var \Illuminate\Log\Context\Repository $instance */
  5636. return $instance->stackContains($key, $value, $strict);
  5637. }
  5638. /**
  5639. * Determine if the given value is in the given hidden stack.
  5640. *
  5641. * @param string $key
  5642. * @param mixed $value
  5643. * @param bool $strict
  5644. * @return bool
  5645. * @throws \RuntimeException
  5646. * @static
  5647. */
  5648. public static function hiddenStackContains($key, $value, $strict = false)
  5649. {
  5650. /** @var \Illuminate\Log\Context\Repository $instance */
  5651. return $instance->hiddenStackContains($key, $value, $strict);
  5652. }
  5653. /**
  5654. * Run the callback function with the given context values and restore the original context state when complete.
  5655. *
  5656. * @param callable $callback
  5657. * @param array<string, mixed> $data
  5658. * @param array<string, mixed> $hidden
  5659. * @return mixed
  5660. * @static
  5661. */
  5662. public static function scope($callback, $data = [], $hidden = [])
  5663. {
  5664. /** @var \Illuminate\Log\Context\Repository $instance */
  5665. return $instance->scope($callback, $data, $hidden);
  5666. }
  5667. /**
  5668. * Determine if the repository is empty.
  5669. *
  5670. * @return bool
  5671. * @static
  5672. */
  5673. public static function isEmpty()
  5674. {
  5675. /** @var \Illuminate\Log\Context\Repository $instance */
  5676. return $instance->isEmpty();
  5677. }
  5678. /**
  5679. * Execute the given callback when context is about to be dehydrated.
  5680. *
  5681. * @param callable $callback
  5682. * @return \Illuminate\Log\Context\Repository
  5683. * @static
  5684. */
  5685. public static function dehydrating($callback)
  5686. {
  5687. /** @var \Illuminate\Log\Context\Repository $instance */
  5688. return $instance->dehydrating($callback);
  5689. }
  5690. /**
  5691. * Execute the given callback when context has been hydrated.
  5692. *
  5693. * @param callable $callback
  5694. * @return \Illuminate\Log\Context\Repository
  5695. * @static
  5696. */
  5697. public static function hydrated($callback)
  5698. {
  5699. /** @var \Illuminate\Log\Context\Repository $instance */
  5700. return $instance->hydrated($callback);
  5701. }
  5702. /**
  5703. * Handle unserialize exceptions using the given callback.
  5704. *
  5705. * @param callable|null $callback
  5706. * @return static
  5707. * @static
  5708. */
  5709. public static function handleUnserializeExceptionsUsing($callback)
  5710. {
  5711. /** @var \Illuminate\Log\Context\Repository $instance */
  5712. return $instance->handleUnserializeExceptionsUsing($callback);
  5713. }
  5714. /**
  5715. * Flush all context data.
  5716. *
  5717. * @return \Illuminate\Log\Context\Repository
  5718. * @static
  5719. */
  5720. public static function flush()
  5721. {
  5722. /** @var \Illuminate\Log\Context\Repository $instance */
  5723. return $instance->flush();
  5724. }
  5725. /**
  5726. * Dehydrate the context data.
  5727. *
  5728. * @internal
  5729. * @return \Illuminate\Log\Context\?array
  5730. * @static
  5731. */
  5732. public static function dehydrate()
  5733. {
  5734. /** @var \Illuminate\Log\Context\Repository $instance */
  5735. return $instance->dehydrate();
  5736. }
  5737. /**
  5738. * Hydrate the context instance.
  5739. *
  5740. * @internal
  5741. * @param \Illuminate\Log\Context\?array $context
  5742. * @return \Illuminate\Log\Context\Repository
  5743. * @throws \RuntimeException
  5744. * @static
  5745. */
  5746. public static function hydrate($context)
  5747. {
  5748. /** @var \Illuminate\Log\Context\Repository $instance */
  5749. return $instance->hydrate($context);
  5750. }
  5751. /**
  5752. * Apply the callback if the given "value" is (or resolves to) truthy.
  5753. *
  5754. * @template TWhenParameter
  5755. * @template TWhenReturnType
  5756. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  5757. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  5758. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  5759. * @return $this|TWhenReturnType
  5760. * @static
  5761. */
  5762. public static function when($value = null, $callback = null, $default = null)
  5763. {
  5764. /** @var \Illuminate\Log\Context\Repository $instance */
  5765. return $instance->when($value, $callback, $default);
  5766. }
  5767. /**
  5768. * Apply the callback if the given "value" is (or resolves to) falsy.
  5769. *
  5770. * @template TUnlessParameter
  5771. * @template TUnlessReturnType
  5772. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  5773. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  5774. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  5775. * @return $this|TUnlessReturnType
  5776. * @static
  5777. */
  5778. public static function unless($value = null, $callback = null, $default = null)
  5779. {
  5780. /** @var \Illuminate\Log\Context\Repository $instance */
  5781. return $instance->unless($value, $callback, $default);
  5782. }
  5783. /**
  5784. * Register a custom macro.
  5785. *
  5786. * @param string $name
  5787. * @param object|callable $macro
  5788. * @param-closure-this static $macro
  5789. * @return void
  5790. * @static
  5791. */
  5792. public static function macro($name, $macro)
  5793. {
  5794. \Illuminate\Log\Context\Repository::macro($name, $macro);
  5795. }
  5796. /**
  5797. * Mix another object into the class.
  5798. *
  5799. * @param object $mixin
  5800. * @param bool $replace
  5801. * @return void
  5802. * @throws \ReflectionException
  5803. * @static
  5804. */
  5805. public static function mixin($mixin, $replace = true)
  5806. {
  5807. \Illuminate\Log\Context\Repository::mixin($mixin, $replace);
  5808. }
  5809. /**
  5810. * Checks if macro is registered.
  5811. *
  5812. * @param string $name
  5813. * @return bool
  5814. * @static
  5815. */
  5816. public static function hasMacro($name)
  5817. {
  5818. return \Illuminate\Log\Context\Repository::hasMacro($name);
  5819. }
  5820. /**
  5821. * Flush the existing macros.
  5822. *
  5823. * @return void
  5824. * @static
  5825. */
  5826. public static function flushMacros()
  5827. {
  5828. \Illuminate\Log\Context\Repository::flushMacros();
  5829. }
  5830. /**
  5831. * Restore the model from the model identifier instance.
  5832. *
  5833. * @param \Illuminate\Contracts\Database\ModelIdentifier $value
  5834. * @return \Illuminate\Database\Eloquent\Model
  5835. * @static
  5836. */
  5837. public static function restoreModel($value)
  5838. {
  5839. /** @var \Illuminate\Log\Context\Repository $instance */
  5840. return $instance->restoreModel($value);
  5841. }
  5842. }
  5843. /**
  5844. * @see \Illuminate\Cookie\CookieJar
  5845. */
  5846. class Cookie {
  5847. /**
  5848. * Create a new cookie instance.
  5849. *
  5850. * @param string $name
  5851. * @param string $value
  5852. * @param int $minutes
  5853. * @param string|null $path
  5854. * @param string|null $domain
  5855. * @param bool|null $secure
  5856. * @param bool $httpOnly
  5857. * @param bool $raw
  5858. * @param string|null $sameSite
  5859. * @return \Symfony\Component\HttpFoundation\Cookie
  5860. * @static
  5861. */
  5862. public static function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
  5863. {
  5864. /** @var \Illuminate\Cookie\CookieJar $instance */
  5865. return $instance->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly, $raw, $sameSite);
  5866. }
  5867. /**
  5868. * Create a cookie that lasts "forever" (400 days).
  5869. *
  5870. * @param string $name
  5871. * @param string $value
  5872. * @param string|null $path
  5873. * @param string|null $domain
  5874. * @param bool|null $secure
  5875. * @param bool $httpOnly
  5876. * @param bool $raw
  5877. * @param string|null $sameSite
  5878. * @return \Symfony\Component\HttpFoundation\Cookie
  5879. * @static
  5880. */
  5881. public static function forever($name, $value, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
  5882. {
  5883. /** @var \Illuminate\Cookie\CookieJar $instance */
  5884. return $instance->forever($name, $value, $path, $domain, $secure, $httpOnly, $raw, $sameSite);
  5885. }
  5886. /**
  5887. * Expire the given cookie.
  5888. *
  5889. * @param string $name
  5890. * @param string|null $path
  5891. * @param string|null $domain
  5892. * @return \Symfony\Component\HttpFoundation\Cookie
  5893. * @static
  5894. */
  5895. public static function forget($name, $path = null, $domain = null)
  5896. {
  5897. /** @var \Illuminate\Cookie\CookieJar $instance */
  5898. return $instance->forget($name, $path, $domain);
  5899. }
  5900. /**
  5901. * Determine if a cookie has been queued.
  5902. *
  5903. * @param string $key
  5904. * @param string|null $path
  5905. * @return bool
  5906. * @static
  5907. */
  5908. public static function hasQueued($key, $path = null)
  5909. {
  5910. /** @var \Illuminate\Cookie\CookieJar $instance */
  5911. return $instance->hasQueued($key, $path);
  5912. }
  5913. /**
  5914. * Get a queued cookie instance.
  5915. *
  5916. * @param string $key
  5917. * @param mixed $default
  5918. * @param string|null $path
  5919. * @return \Symfony\Component\HttpFoundation\Cookie|null
  5920. * @static
  5921. */
  5922. public static function queued($key, $default = null, $path = null)
  5923. {
  5924. /** @var \Illuminate\Cookie\CookieJar $instance */
  5925. return $instance->queued($key, $default, $path);
  5926. }
  5927. /**
  5928. * Queue a cookie to send with the next response.
  5929. *
  5930. * @param mixed $parameters
  5931. * @return void
  5932. * @static
  5933. */
  5934. public static function queue(...$parameters)
  5935. {
  5936. /** @var \Illuminate\Cookie\CookieJar $instance */
  5937. $instance->queue(...$parameters);
  5938. }
  5939. /**
  5940. * Queue a cookie to expire with the next response.
  5941. *
  5942. * @param string $name
  5943. * @param string|null $path
  5944. * @param string|null $domain
  5945. * @return void
  5946. * @static
  5947. */
  5948. public static function expire($name, $path = null, $domain = null)
  5949. {
  5950. /** @var \Illuminate\Cookie\CookieJar $instance */
  5951. $instance->expire($name, $path, $domain);
  5952. }
  5953. /**
  5954. * Remove a cookie from the queue.
  5955. *
  5956. * @param string $name
  5957. * @param string|null $path
  5958. * @return void
  5959. * @static
  5960. */
  5961. public static function unqueue($name, $path = null)
  5962. {
  5963. /** @var \Illuminate\Cookie\CookieJar $instance */
  5964. $instance->unqueue($name, $path);
  5965. }
  5966. /**
  5967. * Set the default path and domain for the jar.
  5968. *
  5969. * @param string $path
  5970. * @param string|null $domain
  5971. * @param bool|null $secure
  5972. * @param string|null $sameSite
  5973. * @return \Illuminate\Cookie\CookieJar
  5974. * @static
  5975. */
  5976. public static function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite = null)
  5977. {
  5978. /** @var \Illuminate\Cookie\CookieJar $instance */
  5979. return $instance->setDefaultPathAndDomain($path, $domain, $secure, $sameSite);
  5980. }
  5981. /**
  5982. * Get the cookies which have been queued for the next request.
  5983. *
  5984. * @return \Symfony\Component\HttpFoundation\Cookie[]
  5985. * @static
  5986. */
  5987. public static function getQueuedCookies()
  5988. {
  5989. /** @var \Illuminate\Cookie\CookieJar $instance */
  5990. return $instance->getQueuedCookies();
  5991. }
  5992. /**
  5993. * Flush the cookies which have been queued for the next request.
  5994. *
  5995. * @return \Illuminate\Cookie\CookieJar
  5996. * @static
  5997. */
  5998. public static function flushQueuedCookies()
  5999. {
  6000. /** @var \Illuminate\Cookie\CookieJar $instance */
  6001. return $instance->flushQueuedCookies();
  6002. }
  6003. /**
  6004. * Register a custom macro.
  6005. *
  6006. * @param string $name
  6007. * @param object|callable $macro
  6008. * @param-closure-this static $macro
  6009. * @return void
  6010. * @static
  6011. */
  6012. public static function macro($name, $macro)
  6013. {
  6014. \Illuminate\Cookie\CookieJar::macro($name, $macro);
  6015. }
  6016. /**
  6017. * Mix another object into the class.
  6018. *
  6019. * @param object $mixin
  6020. * @param bool $replace
  6021. * @return void
  6022. * @throws \ReflectionException
  6023. * @static
  6024. */
  6025. public static function mixin($mixin, $replace = true)
  6026. {
  6027. \Illuminate\Cookie\CookieJar::mixin($mixin, $replace);
  6028. }
  6029. /**
  6030. * Checks if macro is registered.
  6031. *
  6032. * @param string $name
  6033. * @return bool
  6034. * @static
  6035. */
  6036. public static function hasMacro($name)
  6037. {
  6038. return \Illuminate\Cookie\CookieJar::hasMacro($name);
  6039. }
  6040. /**
  6041. * Flush the existing macros.
  6042. *
  6043. * @return void
  6044. * @static
  6045. */
  6046. public static function flushMacros()
  6047. {
  6048. \Illuminate\Cookie\CookieJar::flushMacros();
  6049. }
  6050. }
  6051. /**
  6052. * @see \Illuminate\Encryption\Encrypter
  6053. */
  6054. class Crypt {
  6055. /**
  6056. * Determine if the given key and cipher combination is valid.
  6057. *
  6058. * @param string $key
  6059. * @param string $cipher
  6060. * @return bool
  6061. * @static
  6062. */
  6063. public static function supported($key, $cipher)
  6064. {
  6065. return \Illuminate\Encryption\Encrypter::supported($key, $cipher);
  6066. }
  6067. /**
  6068. * Create a new encryption key for the given cipher.
  6069. *
  6070. * @param string $cipher
  6071. * @return string
  6072. * @static
  6073. */
  6074. public static function generateKey($cipher)
  6075. {
  6076. return \Illuminate\Encryption\Encrypter::generateKey($cipher);
  6077. }
  6078. /**
  6079. * Encrypt the given value.
  6080. *
  6081. * @param mixed $value
  6082. * @param bool $serialize
  6083. * @return string
  6084. * @throws \Illuminate\Contracts\Encryption\EncryptException
  6085. * @static
  6086. */
  6087. public static function encrypt($value, $serialize = true)
  6088. {
  6089. /** @var \Illuminate\Encryption\Encrypter $instance */
  6090. return $instance->encrypt($value, $serialize);
  6091. }
  6092. /**
  6093. * Encrypt a string without serialization.
  6094. *
  6095. * @param string $value
  6096. * @return string
  6097. * @throws \Illuminate\Contracts\Encryption\EncryptException
  6098. * @static
  6099. */
  6100. public static function encryptString($value)
  6101. {
  6102. /** @var \Illuminate\Encryption\Encrypter $instance */
  6103. return $instance->encryptString($value);
  6104. }
  6105. /**
  6106. * Decrypt the given value.
  6107. *
  6108. * @param string $payload
  6109. * @param bool $unserialize
  6110. * @return mixed
  6111. * @throws \Illuminate\Contracts\Encryption\DecryptException
  6112. * @static
  6113. */
  6114. public static function decrypt($payload, $unserialize = true)
  6115. {
  6116. /** @var \Illuminate\Encryption\Encrypter $instance */
  6117. return $instance->decrypt($payload, $unserialize);
  6118. }
  6119. /**
  6120. * Decrypt the given string without unserialization.
  6121. *
  6122. * @param string $payload
  6123. * @return string
  6124. * @throws \Illuminate\Contracts\Encryption\DecryptException
  6125. * @static
  6126. */
  6127. public static function decryptString($payload)
  6128. {
  6129. /** @var \Illuminate\Encryption\Encrypter $instance */
  6130. return $instance->decryptString($payload);
  6131. }
  6132. /**
  6133. * Get the encryption key that the encrypter is currently using.
  6134. *
  6135. * @return string
  6136. * @static
  6137. */
  6138. public static function getKey()
  6139. {
  6140. /** @var \Illuminate\Encryption\Encrypter $instance */
  6141. return $instance->getKey();
  6142. }
  6143. /**
  6144. * Get the current encryption key and all previous encryption keys.
  6145. *
  6146. * @return array
  6147. * @static
  6148. */
  6149. public static function getAllKeys()
  6150. {
  6151. /** @var \Illuminate\Encryption\Encrypter $instance */
  6152. return $instance->getAllKeys();
  6153. }
  6154. /**
  6155. * Get the previous encryption keys.
  6156. *
  6157. * @return array
  6158. * @static
  6159. */
  6160. public static function getPreviousKeys()
  6161. {
  6162. /** @var \Illuminate\Encryption\Encrypter $instance */
  6163. return $instance->getPreviousKeys();
  6164. }
  6165. /**
  6166. * Set the previous / legacy encryption keys that should be utilized if decryption fails.
  6167. *
  6168. * @param array $keys
  6169. * @return \Illuminate\Encryption\Encrypter
  6170. * @static
  6171. */
  6172. public static function previousKeys($keys)
  6173. {
  6174. /** @var \Illuminate\Encryption\Encrypter $instance */
  6175. return $instance->previousKeys($keys);
  6176. }
  6177. }
  6178. /**
  6179. * @see https://carbon.nesbot.com/docs/
  6180. * @see https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Factory.php
  6181. * @method static bool canBeCreatedFromFormat(?string $date, string $format)
  6182. * @method static \Illuminate\Support\Carbon|null create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $timezone = null)
  6183. * @method static \Illuminate\Support\Carbon createFromDate($year = null, $month = null, $day = null, $timezone = null)
  6184. * @method static \Illuminate\Support\Carbon|null createFromFormat($format, $time, $timezone = null)
  6185. * @method static \Illuminate\Support\Carbon|null createFromIsoFormat(string $format, string $time, $timezone = null, ?string $locale = 'en', ?\Symfony\Contracts\Translation\TranslatorInterface $translator = null)
  6186. * @method static \Illuminate\Support\Carbon|null createFromLocaleFormat(string $format, string $locale, string $time, $timezone = null)
  6187. * @method static \Illuminate\Support\Carbon|null createFromLocaleIsoFormat(string $format, string $locale, string $time, $timezone = null)
  6188. * @method static \Illuminate\Support\Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $timezone = null)
  6189. * @method static \Illuminate\Support\Carbon createFromTimeString(string $time, \DateTimeZone|string|int|null $timezone = null)
  6190. * @method static \Illuminate\Support\Carbon createFromTimestamp(string|int|float $timestamp, \DateTimeZone|string|int|null $timezone = null)
  6191. * @method static \Illuminate\Support\Carbon createFromTimestampMs(string|int|float $timestamp, \DateTimeZone|string|int|null $timezone = null)
  6192. * @method static \Illuminate\Support\Carbon createFromTimestampMsUTC($timestamp)
  6193. * @method static \Illuminate\Support\Carbon createFromTimestampUTC(string|int|float $timestamp)
  6194. * @method static \Illuminate\Support\Carbon createMidnightDate($year = null, $month = null, $day = null, $timezone = null)
  6195. * @method static \Illuminate\Support\Carbon|null createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $timezone = null)
  6196. * @method static \Illuminate\Support\Carbon createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $timezone = null)
  6197. * @method static void disableHumanDiffOption($humanDiffOption)
  6198. * @method static void enableHumanDiffOption($humanDiffOption)
  6199. * @method static mixed executeWithLocale(string $locale, callable $func)
  6200. * @method static \Illuminate\Support\Carbon fromSerialized($value)
  6201. * @method static array getAvailableLocales()
  6202. * @method static array getAvailableLocalesInfo()
  6203. * @method static array getDays()
  6204. * @method static ?string getFallbackLocale()
  6205. * @method static array getFormatsToIsoReplacements()
  6206. * @method static int getHumanDiffOptions()
  6207. * @method static array getIsoUnits()
  6208. * @method static array|false getLastErrors()
  6209. * @method static string getLocale()
  6210. * @method static int getMidDayAt()
  6211. * @method static string getTimeFormatByPrecision(string $unitPrecision)
  6212. * @method static string|\Closure|null getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null)
  6213. * @method static \Illuminate\Support\Carbon|null getTestNow()
  6214. * @method static \Symfony\Contracts\Translation\TranslatorInterface getTranslator()
  6215. * @method static int getWeekEndsAt(?string $locale = null)
  6216. * @method static int getWeekStartsAt(?string $locale = null)
  6217. * @method static array getWeekendDays()
  6218. * @method static bool hasFormat(string $date, string $format)
  6219. * @method static bool hasFormatWithModifiers(string $date, string $format)
  6220. * @method static bool hasMacro($name)
  6221. * @method static bool hasRelativeKeywords(?string $time)
  6222. * @method static bool hasTestNow()
  6223. * @method static \Illuminate\Support\Carbon instance(\DateTimeInterface $date)
  6224. * @method static bool isImmutable()
  6225. * @method static bool isModifiableUnit($unit)
  6226. * @method static bool isMutable()
  6227. * @method static bool isStrictModeEnabled()
  6228. * @method static bool localeHasDiffOneDayWords(string $locale)
  6229. * @method static bool localeHasDiffSyntax(string $locale)
  6230. * @method static bool localeHasDiffTwoDayWords(string $locale)
  6231. * @method static bool localeHasPeriodSyntax($locale)
  6232. * @method static bool localeHasShortUnits(string $locale)
  6233. * @method static void macro(string $name, ?callable $macro)
  6234. * @method static \Illuminate\Support\Carbon|null make($var, \DateTimeZone|string|null $timezone = null)
  6235. * @method static void mixin(object|string $mixin)
  6236. * @method static \Illuminate\Support\Carbon now(\DateTimeZone|string|int|null $timezone = null)
  6237. * @method static \Illuminate\Support\Carbon parse(\DateTimeInterface|\Carbon\WeekDay|\Carbon\Month|string|int|float|null $time, \DateTimeZone|string|int|null $timezone = null)
  6238. * @method static \Illuminate\Support\Carbon parseFromLocale(string $time, ?string $locale = null, \DateTimeZone|string|int|null $timezone = null)
  6239. * @method static string pluralUnit(string $unit)
  6240. * @method static \Illuminate\Support\Carbon|null rawCreateFromFormat(string $format, string $time, $timezone = null)
  6241. * @method static \Illuminate\Support\Carbon rawParse(\DateTimeInterface|\Carbon\WeekDay|\Carbon\Month|string|int|float|null $time, \DateTimeZone|string|int|null $timezone = null)
  6242. * @method static void resetMonthsOverflow()
  6243. * @method static void resetToStringFormat()
  6244. * @method static void resetYearsOverflow()
  6245. * @method static void serializeUsing($callback)
  6246. * @method static void setFallbackLocale(string $locale)
  6247. * @method static void setHumanDiffOptions($humanDiffOptions)
  6248. * @method static void setLocale(string $locale)
  6249. * @method static void setMidDayAt($hour)
  6250. * @method static void setTestNow(mixed $testNow = null)
  6251. * @method static void setTestNowAndTimezone(mixed $testNow = null, $timezone = null)
  6252. * @method static void setToStringFormat(string|\Closure|null $format)
  6253. * @method static void setTranslator(\Symfony\Contracts\Translation\TranslatorInterface $translator)
  6254. * @method static void setWeekEndsAt($day)
  6255. * @method static void setWeekStartsAt($day)
  6256. * @method static void setWeekendDays($days)
  6257. * @method static bool shouldOverflowMonths()
  6258. * @method static bool shouldOverflowYears()
  6259. * @method static string singularUnit(string $unit)
  6260. * @method static void sleep(int|float $seconds)
  6261. * @method static \Illuminate\Support\Carbon today(\DateTimeZone|string|int|null $timezone = null)
  6262. * @method static \Illuminate\Support\Carbon tomorrow(\DateTimeZone|string|int|null $timezone = null)
  6263. * @method static string translateTimeString(string $timeString, ?string $from = null, ?string $to = null, int $mode = \Carbon\CarbonInterface::TRANSLATE_ALL)
  6264. * @method static string translateWith(\Symfony\Contracts\Translation\TranslatorInterface $translator, string $key, array $parameters = [], $number = null)
  6265. * @method static void useMonthsOverflow($monthsOverflow = true)
  6266. * @method static void useStrictMode($strictModeEnabled = true)
  6267. * @method static void useYearsOverflow($yearsOverflow = true)
  6268. * @method static mixed withTestNow(mixed $testNow, callable $callback)
  6269. * @method static static withTimeZone(\DateTimeZone|string|int|null $timezone)
  6270. * @method static \Illuminate\Support\Carbon yesterday(\DateTimeZone|string|int|null $timezone = null)
  6271. * @see \Illuminate\Support\DateFactory
  6272. */
  6273. class Date {
  6274. /**
  6275. * Use the given handler when generating dates (class name, callable, or factory).
  6276. *
  6277. * @param mixed $handler
  6278. * @return mixed
  6279. * @throws \InvalidArgumentException
  6280. * @static
  6281. */
  6282. public static function use($handler)
  6283. {
  6284. return \Illuminate\Support\DateFactory::use($handler);
  6285. }
  6286. /**
  6287. * Use the default date class when generating dates.
  6288. *
  6289. * @return void
  6290. * @static
  6291. */
  6292. public static function useDefault()
  6293. {
  6294. \Illuminate\Support\DateFactory::useDefault();
  6295. }
  6296. /**
  6297. * Execute the given callable on each date creation.
  6298. *
  6299. * @param callable $callable
  6300. * @return void
  6301. * @static
  6302. */
  6303. public static function useCallable($callable)
  6304. {
  6305. \Illuminate\Support\DateFactory::useCallable($callable);
  6306. }
  6307. /**
  6308. * Use the given date type (class) when generating dates.
  6309. *
  6310. * @param string $dateClass
  6311. * @return void
  6312. * @static
  6313. */
  6314. public static function useClass($dateClass)
  6315. {
  6316. \Illuminate\Support\DateFactory::useClass($dateClass);
  6317. }
  6318. /**
  6319. * Use the given Carbon factory when generating dates.
  6320. *
  6321. * @param object $factory
  6322. * @return void
  6323. * @static
  6324. */
  6325. public static function useFactory($factory)
  6326. {
  6327. \Illuminate\Support\DateFactory::useFactory($factory);
  6328. }
  6329. }
  6330. /**
  6331. * @see \Illuminate\Database\DatabaseManager
  6332. */
  6333. class DB {
  6334. /**
  6335. * Get a database connection instance.
  6336. *
  6337. * @param string|null $name
  6338. * @return \Illuminate\Database\Connection
  6339. * @static
  6340. */
  6341. public static function connection($name = null)
  6342. {
  6343. /** @var \Illuminate\Database\DatabaseManager $instance */
  6344. return $instance->connection($name);
  6345. }
  6346. /**
  6347. * Build a database connection instance from the given configuration.
  6348. *
  6349. * @param array $config
  6350. * @return \Illuminate\Database\PostgresConnection
  6351. * @static
  6352. */
  6353. public static function build($config)
  6354. {
  6355. /** @var \Illuminate\Database\DatabaseManager $instance */
  6356. return $instance->build($config);
  6357. }
  6358. /**
  6359. * Calculate the dynamic connection name for an on-demand connection based on its configuration.
  6360. *
  6361. * @param array $config
  6362. * @return string
  6363. * @static
  6364. */
  6365. public static function calculateDynamicConnectionName($config)
  6366. {
  6367. return \Illuminate\Database\DatabaseManager::calculateDynamicConnectionName($config);
  6368. }
  6369. /**
  6370. * Get a database connection instance from the given configuration.
  6371. *
  6372. * @param string $name
  6373. * @param array $config
  6374. * @param bool $force
  6375. * @return \Illuminate\Database\PostgresConnection
  6376. * @static
  6377. */
  6378. public static function connectUsing($name, $config, $force = false)
  6379. {
  6380. /** @var \Illuminate\Database\DatabaseManager $instance */
  6381. return $instance->connectUsing($name, $config, $force);
  6382. }
  6383. /**
  6384. * Disconnect from the given database and remove from local cache.
  6385. *
  6386. * @param string|null $name
  6387. * @return void
  6388. * @static
  6389. */
  6390. public static function purge($name = null)
  6391. {
  6392. /** @var \Illuminate\Database\DatabaseManager $instance */
  6393. $instance->purge($name);
  6394. }
  6395. /**
  6396. * Disconnect from the given database.
  6397. *
  6398. * @param string|null $name
  6399. * @return void
  6400. * @static
  6401. */
  6402. public static function disconnect($name = null)
  6403. {
  6404. /** @var \Illuminate\Database\DatabaseManager $instance */
  6405. $instance->disconnect($name);
  6406. }
  6407. /**
  6408. * Reconnect to the given database.
  6409. *
  6410. * @param string|null $name
  6411. * @return \Illuminate\Database\Connection
  6412. * @static
  6413. */
  6414. public static function reconnect($name = null)
  6415. {
  6416. /** @var \Illuminate\Database\DatabaseManager $instance */
  6417. return $instance->reconnect($name);
  6418. }
  6419. /**
  6420. * Set the default database connection for the callback execution.
  6421. *
  6422. * @param string $name
  6423. * @param callable $callback
  6424. * @return mixed
  6425. * @static
  6426. */
  6427. public static function usingConnection($name, $callback)
  6428. {
  6429. /** @var \Illuminate\Database\DatabaseManager $instance */
  6430. return $instance->usingConnection($name, $callback);
  6431. }
  6432. /**
  6433. * Get the default connection name.
  6434. *
  6435. * @return string
  6436. * @static
  6437. */
  6438. public static function getDefaultConnection()
  6439. {
  6440. /** @var \Illuminate\Database\DatabaseManager $instance */
  6441. return $instance->getDefaultConnection();
  6442. }
  6443. /**
  6444. * Set the default connection name.
  6445. *
  6446. * @param string $name
  6447. * @return void
  6448. * @static
  6449. */
  6450. public static function setDefaultConnection($name)
  6451. {
  6452. /** @var \Illuminate\Database\DatabaseManager $instance */
  6453. $instance->setDefaultConnection($name);
  6454. }
  6455. /**
  6456. * Get all of the supported drivers.
  6457. *
  6458. * @return string[]
  6459. * @static
  6460. */
  6461. public static function supportedDrivers()
  6462. {
  6463. /** @var \Illuminate\Database\DatabaseManager $instance */
  6464. return $instance->supportedDrivers();
  6465. }
  6466. /**
  6467. * Get all of the drivers that are actually available.
  6468. *
  6469. * @return string[]
  6470. * @static
  6471. */
  6472. public static function availableDrivers()
  6473. {
  6474. /** @var \Illuminate\Database\DatabaseManager $instance */
  6475. return $instance->availableDrivers();
  6476. }
  6477. /**
  6478. * Register an extension connection resolver.
  6479. *
  6480. * @param string $name
  6481. * @param callable $resolver
  6482. * @return void
  6483. * @static
  6484. */
  6485. public static function extend($name, $resolver)
  6486. {
  6487. /** @var \Illuminate\Database\DatabaseManager $instance */
  6488. $instance->extend($name, $resolver);
  6489. }
  6490. /**
  6491. * Remove an extension connection resolver.
  6492. *
  6493. * @param string $name
  6494. * @return void
  6495. * @static
  6496. */
  6497. public static function forgetExtension($name)
  6498. {
  6499. /** @var \Illuminate\Database\DatabaseManager $instance */
  6500. $instance->forgetExtension($name);
  6501. }
  6502. /**
  6503. * Return all of the created connections.
  6504. *
  6505. * @return array<string, \Illuminate\Database\Connection>
  6506. * @static
  6507. */
  6508. public static function getConnections()
  6509. {
  6510. /** @var \Illuminate\Database\DatabaseManager $instance */
  6511. return $instance->getConnections();
  6512. }
  6513. /**
  6514. * Set the database reconnector callback.
  6515. *
  6516. * @param callable $reconnector
  6517. * @return void
  6518. * @static
  6519. */
  6520. public static function setReconnector($reconnector)
  6521. {
  6522. /** @var \Illuminate\Database\DatabaseManager $instance */
  6523. $instance->setReconnector($reconnector);
  6524. }
  6525. /**
  6526. * Set the application instance used by the manager.
  6527. *
  6528. * @param \Illuminate\Contracts\Foundation\Application $app
  6529. * @return \Illuminate\Database\DatabaseManager
  6530. * @static
  6531. */
  6532. public static function setApplication($app)
  6533. {
  6534. /** @var \Illuminate\Database\DatabaseManager $instance */
  6535. return $instance->setApplication($app);
  6536. }
  6537. /**
  6538. * Register a custom macro.
  6539. *
  6540. * @param string $name
  6541. * @param object|callable $macro
  6542. * @param-closure-this static $macro
  6543. * @return void
  6544. * @static
  6545. */
  6546. public static function macro($name, $macro)
  6547. {
  6548. \Illuminate\Database\DatabaseManager::macro($name, $macro);
  6549. }
  6550. /**
  6551. * Mix another object into the class.
  6552. *
  6553. * @param object $mixin
  6554. * @param bool $replace
  6555. * @return void
  6556. * @throws \ReflectionException
  6557. * @static
  6558. */
  6559. public static function mixin($mixin, $replace = true)
  6560. {
  6561. \Illuminate\Database\DatabaseManager::mixin($mixin, $replace);
  6562. }
  6563. /**
  6564. * Checks if macro is registered.
  6565. *
  6566. * @param string $name
  6567. * @return bool
  6568. * @static
  6569. */
  6570. public static function hasMacro($name)
  6571. {
  6572. return \Illuminate\Database\DatabaseManager::hasMacro($name);
  6573. }
  6574. /**
  6575. * Flush the existing macros.
  6576. *
  6577. * @return void
  6578. * @static
  6579. */
  6580. public static function flushMacros()
  6581. {
  6582. \Illuminate\Database\DatabaseManager::flushMacros();
  6583. }
  6584. /**
  6585. * Dynamically handle calls to the class.
  6586. *
  6587. * @param string $method
  6588. * @param array $parameters
  6589. * @return mixed
  6590. * @throws \BadMethodCallException
  6591. * @static
  6592. */
  6593. public static function macroCall($method, $parameters)
  6594. {
  6595. /** @var \Illuminate\Database\DatabaseManager $instance */
  6596. return $instance->macroCall($method, $parameters);
  6597. }
  6598. /**
  6599. * Get a human-readable name for the given connection driver.
  6600. *
  6601. * @return string
  6602. * @static
  6603. */
  6604. public static function getDriverTitle()
  6605. {
  6606. /** @var \Illuminate\Database\PostgresConnection $instance */
  6607. return $instance->getDriverTitle();
  6608. }
  6609. /**
  6610. * Get a schema builder instance for the connection.
  6611. *
  6612. * @return \Illuminate\Database\Schema\PostgresBuilder
  6613. * @static
  6614. */
  6615. public static function getSchemaBuilder()
  6616. {
  6617. /** @var \Illuminate\Database\PostgresConnection $instance */
  6618. return $instance->getSchemaBuilder();
  6619. }
  6620. /**
  6621. * Get the schema state for the connection.
  6622. *
  6623. * @param \Illuminate\Filesystem\Filesystem|null $files
  6624. * @param callable|null $processFactory
  6625. * @return \Illuminate\Database\Schema\PostgresSchemaState
  6626. * @static
  6627. */
  6628. public static function getSchemaState($files = null, $processFactory = null)
  6629. {
  6630. /** @var \Illuminate\Database\PostgresConnection $instance */
  6631. return $instance->getSchemaState($files, $processFactory);
  6632. }
  6633. /**
  6634. * Set the query grammar to the default implementation.
  6635. *
  6636. * @return void
  6637. * @static
  6638. */
  6639. public static function useDefaultQueryGrammar()
  6640. {
  6641. //Method inherited from \Illuminate\Database\Connection
  6642. /** @var \Illuminate\Database\PostgresConnection $instance */
  6643. $instance->useDefaultQueryGrammar();
  6644. }
  6645. /**
  6646. * Set the schema grammar to the default implementation.
  6647. *
  6648. * @return void
  6649. * @static
  6650. */
  6651. public static function useDefaultSchemaGrammar()
  6652. {
  6653. //Method inherited from \Illuminate\Database\Connection
  6654. /** @var \Illuminate\Database\PostgresConnection $instance */
  6655. $instance->useDefaultSchemaGrammar();
  6656. }
  6657. /**
  6658. * Set the query post processor to the default implementation.
  6659. *
  6660. * @return void
  6661. * @static
  6662. */
  6663. public static function useDefaultPostProcessor()
  6664. {
  6665. //Method inherited from \Illuminate\Database\Connection
  6666. /** @var \Illuminate\Database\PostgresConnection $instance */
  6667. $instance->useDefaultPostProcessor();
  6668. }
  6669. /**
  6670. * Begin a fluent query against a database table.
  6671. *
  6672. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string $table
  6673. * @param string|null $as
  6674. * @return \Illuminate\Database\Query\Builder
  6675. * @static
  6676. */
  6677. public static function table($table, $as = null)
  6678. {
  6679. //Method inherited from \Illuminate\Database\Connection
  6680. /** @var \Illuminate\Database\PostgresConnection $instance */
  6681. return $instance->table($table, $as);
  6682. }
  6683. /**
  6684. * Get a new query builder instance.
  6685. *
  6686. * @return \Illuminate\Database\Query\Builder
  6687. * @static
  6688. */
  6689. public static function query()
  6690. {
  6691. //Method inherited from \Illuminate\Database\Connection
  6692. /** @var \Illuminate\Database\PostgresConnection $instance */
  6693. return $instance->query();
  6694. }
  6695. /**
  6696. * Run a select statement and return a single result.
  6697. *
  6698. * @param string $query
  6699. * @param array $bindings
  6700. * @param bool $useReadPdo
  6701. * @return mixed
  6702. * @static
  6703. */
  6704. public static function selectOne($query, $bindings = [], $useReadPdo = true)
  6705. {
  6706. //Method inherited from \Illuminate\Database\Connection
  6707. /** @var \Illuminate\Database\PostgresConnection $instance */
  6708. return $instance->selectOne($query, $bindings, $useReadPdo);
  6709. }
  6710. /**
  6711. * Run a select statement and return the first column of the first row.
  6712. *
  6713. * @param string $query
  6714. * @param array $bindings
  6715. * @param bool $useReadPdo
  6716. * @return mixed
  6717. * @throws \Illuminate\Database\MultipleColumnsSelectedException
  6718. * @static
  6719. */
  6720. public static function scalar($query, $bindings = [], $useReadPdo = true)
  6721. {
  6722. //Method inherited from \Illuminate\Database\Connection
  6723. /** @var \Illuminate\Database\PostgresConnection $instance */
  6724. return $instance->scalar($query, $bindings, $useReadPdo);
  6725. }
  6726. /**
  6727. * Run a select statement against the database.
  6728. *
  6729. * @param string $query
  6730. * @param array $bindings
  6731. * @return array
  6732. * @static
  6733. */
  6734. public static function selectFromWriteConnection($query, $bindings = [])
  6735. {
  6736. //Method inherited from \Illuminate\Database\Connection
  6737. /** @var \Illuminate\Database\PostgresConnection $instance */
  6738. return $instance->selectFromWriteConnection($query, $bindings);
  6739. }
  6740. /**
  6741. * Run a select statement against the database.
  6742. *
  6743. * @param string $query
  6744. * @param array $bindings
  6745. * @param bool $useReadPdo
  6746. * @return array
  6747. * @static
  6748. */
  6749. public static function select($query, $bindings = [], $useReadPdo = true)
  6750. {
  6751. //Method inherited from \Illuminate\Database\Connection
  6752. /** @var \Illuminate\Database\PostgresConnection $instance */
  6753. return $instance->select($query, $bindings, $useReadPdo);
  6754. }
  6755. /**
  6756. * Run a select statement against the database and returns all of the result sets.
  6757. *
  6758. * @param string $query
  6759. * @param array $bindings
  6760. * @param bool $useReadPdo
  6761. * @return array
  6762. * @static
  6763. */
  6764. public static function selectResultSets($query, $bindings = [], $useReadPdo = true)
  6765. {
  6766. //Method inherited from \Illuminate\Database\Connection
  6767. /** @var \Illuminate\Database\PostgresConnection $instance */
  6768. return $instance->selectResultSets($query, $bindings, $useReadPdo);
  6769. }
  6770. /**
  6771. * Run a select statement against the database and returns a generator.
  6772. *
  6773. * @param string $query
  6774. * @param array $bindings
  6775. * @param bool $useReadPdo
  6776. * @return \Generator<int, \stdClass>
  6777. * @static
  6778. */
  6779. public static function cursor($query, $bindings = [], $useReadPdo = true)
  6780. {
  6781. //Method inherited from \Illuminate\Database\Connection
  6782. /** @var \Illuminate\Database\PostgresConnection $instance */
  6783. return $instance->cursor($query, $bindings, $useReadPdo);
  6784. }
  6785. /**
  6786. * Run an insert statement against the database.
  6787. *
  6788. * @param string $query
  6789. * @param array $bindings
  6790. * @return bool
  6791. * @static
  6792. */
  6793. public static function insert($query, $bindings = [])
  6794. {
  6795. //Method inherited from \Illuminate\Database\Connection
  6796. /** @var \Illuminate\Database\PostgresConnection $instance */
  6797. return $instance->insert($query, $bindings);
  6798. }
  6799. /**
  6800. * Run an update statement against the database.
  6801. *
  6802. * @param string $query
  6803. * @param array $bindings
  6804. * @return int
  6805. * @static
  6806. */
  6807. public static function update($query, $bindings = [])
  6808. {
  6809. //Method inherited from \Illuminate\Database\Connection
  6810. /** @var \Illuminate\Database\PostgresConnection $instance */
  6811. return $instance->update($query, $bindings);
  6812. }
  6813. /**
  6814. * Run a delete statement against the database.
  6815. *
  6816. * @param string $query
  6817. * @param array $bindings
  6818. * @return int
  6819. * @static
  6820. */
  6821. public static function delete($query, $bindings = [])
  6822. {
  6823. //Method inherited from \Illuminate\Database\Connection
  6824. /** @var \Illuminate\Database\PostgresConnection $instance */
  6825. return $instance->delete($query, $bindings);
  6826. }
  6827. /**
  6828. * Execute an SQL statement and return the boolean result.
  6829. *
  6830. * @param string $query
  6831. * @param array $bindings
  6832. * @return bool
  6833. * @static
  6834. */
  6835. public static function statement($query, $bindings = [])
  6836. {
  6837. //Method inherited from \Illuminate\Database\Connection
  6838. /** @var \Illuminate\Database\PostgresConnection $instance */
  6839. return $instance->statement($query, $bindings);
  6840. }
  6841. /**
  6842. * Run an SQL statement and get the number of rows affected.
  6843. *
  6844. * @param string $query
  6845. * @param array $bindings
  6846. * @return int
  6847. * @static
  6848. */
  6849. public static function affectingStatement($query, $bindings = [])
  6850. {
  6851. //Method inherited from \Illuminate\Database\Connection
  6852. /** @var \Illuminate\Database\PostgresConnection $instance */
  6853. return $instance->affectingStatement($query, $bindings);
  6854. }
  6855. /**
  6856. * Run a raw, unprepared query against the PDO connection.
  6857. *
  6858. * @param string $query
  6859. * @return bool
  6860. * @static
  6861. */
  6862. public static function unprepared($query)
  6863. {
  6864. //Method inherited from \Illuminate\Database\Connection
  6865. /** @var \Illuminate\Database\PostgresConnection $instance */
  6866. return $instance->unprepared($query);
  6867. }
  6868. /**
  6869. * Get the number of open connections for the database.
  6870. *
  6871. * @return int|null
  6872. * @static
  6873. */
  6874. public static function threadCount()
  6875. {
  6876. //Method inherited from \Illuminate\Database\Connection
  6877. /** @var \Illuminate\Database\PostgresConnection $instance */
  6878. return $instance->threadCount();
  6879. }
  6880. /**
  6881. * Execute the given callback in "dry run" mode.
  6882. *
  6883. * @param \Closure $callback
  6884. * @return array
  6885. * @static
  6886. */
  6887. public static function pretend($callback)
  6888. {
  6889. //Method inherited from \Illuminate\Database\Connection
  6890. /** @var \Illuminate\Database\PostgresConnection $instance */
  6891. return $instance->pretend($callback);
  6892. }
  6893. /**
  6894. * Execute the given callback without "pretending".
  6895. *
  6896. * @param \Closure $callback
  6897. * @return mixed
  6898. * @static
  6899. */
  6900. public static function withoutPretending($callback)
  6901. {
  6902. //Method inherited from \Illuminate\Database\Connection
  6903. /** @var \Illuminate\Database\PostgresConnection $instance */
  6904. return $instance->withoutPretending($callback);
  6905. }
  6906. /**
  6907. * Bind values to their parameters in the given statement.
  6908. *
  6909. * @param \PDOStatement $statement
  6910. * @param array $bindings
  6911. * @return void
  6912. * @static
  6913. */
  6914. public static function bindValues($statement, $bindings)
  6915. {
  6916. //Method inherited from \Illuminate\Database\Connection
  6917. /** @var \Illuminate\Database\PostgresConnection $instance */
  6918. $instance->bindValues($statement, $bindings);
  6919. }
  6920. /**
  6921. * Prepare the query bindings for execution.
  6922. *
  6923. * @param array $bindings
  6924. * @return array
  6925. * @static
  6926. */
  6927. public static function prepareBindings($bindings)
  6928. {
  6929. //Method inherited from \Illuminate\Database\Connection
  6930. /** @var \Illuminate\Database\PostgresConnection $instance */
  6931. return $instance->prepareBindings($bindings);
  6932. }
  6933. /**
  6934. * Log a query in the connection's query log.
  6935. *
  6936. * @param string $query
  6937. * @param array $bindings
  6938. * @param float|null $time
  6939. * @return void
  6940. * @static
  6941. */
  6942. public static function logQuery($query, $bindings, $time = null)
  6943. {
  6944. //Method inherited from \Illuminate\Database\Connection
  6945. /** @var \Illuminate\Database\PostgresConnection $instance */
  6946. $instance->logQuery($query, $bindings, $time);
  6947. }
  6948. /**
  6949. * Register a callback to be invoked when the connection queries for longer than a given amount of time.
  6950. *
  6951. * @param \DateTimeInterface|\Carbon\CarbonInterval|float|int $threshold
  6952. * @param callable $handler
  6953. * @return void
  6954. * @static
  6955. */
  6956. public static function whenQueryingForLongerThan($threshold, $handler)
  6957. {
  6958. //Method inherited from \Illuminate\Database\Connection
  6959. /** @var \Illuminate\Database\PostgresConnection $instance */
  6960. $instance->whenQueryingForLongerThan($threshold, $handler);
  6961. }
  6962. /**
  6963. * Allow all the query duration handlers to run again, even if they have already run.
  6964. *
  6965. * @return void
  6966. * @static
  6967. */
  6968. public static function allowQueryDurationHandlersToRunAgain()
  6969. {
  6970. //Method inherited from \Illuminate\Database\Connection
  6971. /** @var \Illuminate\Database\PostgresConnection $instance */
  6972. $instance->allowQueryDurationHandlersToRunAgain();
  6973. }
  6974. /**
  6975. * Get the duration of all run queries in milliseconds.
  6976. *
  6977. * @return float
  6978. * @static
  6979. */
  6980. public static function totalQueryDuration()
  6981. {
  6982. //Method inherited from \Illuminate\Database\Connection
  6983. /** @var \Illuminate\Database\PostgresConnection $instance */
  6984. return $instance->totalQueryDuration();
  6985. }
  6986. /**
  6987. * Reset the duration of all run queries.
  6988. *
  6989. * @return void
  6990. * @static
  6991. */
  6992. public static function resetTotalQueryDuration()
  6993. {
  6994. //Method inherited from \Illuminate\Database\Connection
  6995. /** @var \Illuminate\Database\PostgresConnection $instance */
  6996. $instance->resetTotalQueryDuration();
  6997. }
  6998. /**
  6999. * Reconnect to the database if a PDO connection is missing.
  7000. *
  7001. * @return void
  7002. * @static
  7003. */
  7004. public static function reconnectIfMissingConnection()
  7005. {
  7006. //Method inherited from \Illuminate\Database\Connection
  7007. /** @var \Illuminate\Database\PostgresConnection $instance */
  7008. $instance->reconnectIfMissingConnection();
  7009. }
  7010. /**
  7011. * Register a hook to be run just before a database transaction is started.
  7012. *
  7013. * @param \Closure $callback
  7014. * @return \Illuminate\Database\PostgresConnection
  7015. * @static
  7016. */
  7017. public static function beforeStartingTransaction($callback)
  7018. {
  7019. //Method inherited from \Illuminate\Database\Connection
  7020. /** @var \Illuminate\Database\PostgresConnection $instance */
  7021. return $instance->beforeStartingTransaction($callback);
  7022. }
  7023. /**
  7024. * Register a hook to be run just before a database query is executed.
  7025. *
  7026. * @param \Closure $callback
  7027. * @return \Illuminate\Database\PostgresConnection
  7028. * @static
  7029. */
  7030. public static function beforeExecuting($callback)
  7031. {
  7032. //Method inherited from \Illuminate\Database\Connection
  7033. /** @var \Illuminate\Database\PostgresConnection $instance */
  7034. return $instance->beforeExecuting($callback);
  7035. }
  7036. /**
  7037. * Register a database query listener with the connection.
  7038. *
  7039. * @param \Closure $callback
  7040. * @return void
  7041. * @static
  7042. */
  7043. public static function listen($callback)
  7044. {
  7045. //Method inherited from \Illuminate\Database\Connection
  7046. /** @var \Illuminate\Database\PostgresConnection $instance */
  7047. $instance->listen($callback);
  7048. }
  7049. /**
  7050. * Get a new raw query expression.
  7051. *
  7052. * @param mixed $value
  7053. * @return \Illuminate\Contracts\Database\Query\Expression
  7054. * @static
  7055. */
  7056. public static function raw($value)
  7057. {
  7058. //Method inherited from \Illuminate\Database\Connection
  7059. /** @var \Illuminate\Database\PostgresConnection $instance */
  7060. return $instance->raw($value);
  7061. }
  7062. /**
  7063. * Escape a value for safe SQL embedding.
  7064. *
  7065. * @param string|float|int|bool|null $value
  7066. * @param bool $binary
  7067. * @return string
  7068. * @static
  7069. */
  7070. public static function escape($value, $binary = false)
  7071. {
  7072. //Method inherited from \Illuminate\Database\Connection
  7073. /** @var \Illuminate\Database\PostgresConnection $instance */
  7074. return $instance->escape($value, $binary);
  7075. }
  7076. /**
  7077. * Determine if the database connection has modified any database records.
  7078. *
  7079. * @return bool
  7080. * @static
  7081. */
  7082. public static function hasModifiedRecords()
  7083. {
  7084. //Method inherited from \Illuminate\Database\Connection
  7085. /** @var \Illuminate\Database\PostgresConnection $instance */
  7086. return $instance->hasModifiedRecords();
  7087. }
  7088. /**
  7089. * Indicate if any records have been modified.
  7090. *
  7091. * @param bool $value
  7092. * @return void
  7093. * @static
  7094. */
  7095. public static function recordsHaveBeenModified($value = true)
  7096. {
  7097. //Method inherited from \Illuminate\Database\Connection
  7098. /** @var \Illuminate\Database\PostgresConnection $instance */
  7099. $instance->recordsHaveBeenModified($value);
  7100. }
  7101. /**
  7102. * Set the record modification state.
  7103. *
  7104. * @param bool $value
  7105. * @return \Illuminate\Database\PostgresConnection
  7106. * @static
  7107. */
  7108. public static function setRecordModificationState($value)
  7109. {
  7110. //Method inherited from \Illuminate\Database\Connection
  7111. /** @var \Illuminate\Database\PostgresConnection $instance */
  7112. return $instance->setRecordModificationState($value);
  7113. }
  7114. /**
  7115. * Reset the record modification state.
  7116. *
  7117. * @return void
  7118. * @static
  7119. */
  7120. public static function forgetRecordModificationState()
  7121. {
  7122. //Method inherited from \Illuminate\Database\Connection
  7123. /** @var \Illuminate\Database\PostgresConnection $instance */
  7124. $instance->forgetRecordModificationState();
  7125. }
  7126. /**
  7127. * Indicate that the connection should use the write PDO connection for reads.
  7128. *
  7129. * @param bool $value
  7130. * @return \Illuminate\Database\PostgresConnection
  7131. * @static
  7132. */
  7133. public static function useWriteConnectionWhenReading($value = true)
  7134. {
  7135. //Method inherited from \Illuminate\Database\Connection
  7136. /** @var \Illuminate\Database\PostgresConnection $instance */
  7137. return $instance->useWriteConnectionWhenReading($value);
  7138. }
  7139. /**
  7140. * Get the current PDO connection.
  7141. *
  7142. * @return \PDO
  7143. * @static
  7144. */
  7145. public static function getPdo()
  7146. {
  7147. //Method inherited from \Illuminate\Database\Connection
  7148. /** @var \Illuminate\Database\PostgresConnection $instance */
  7149. return $instance->getPdo();
  7150. }
  7151. /**
  7152. * Get the current PDO connection parameter without executing any reconnect logic.
  7153. *
  7154. * @return \PDO|\Closure|null
  7155. * @static
  7156. */
  7157. public static function getRawPdo()
  7158. {
  7159. //Method inherited from \Illuminate\Database\Connection
  7160. /** @var \Illuminate\Database\PostgresConnection $instance */
  7161. return $instance->getRawPdo();
  7162. }
  7163. /**
  7164. * Get the current PDO connection used for reading.
  7165. *
  7166. * @return \PDO
  7167. * @static
  7168. */
  7169. public static function getReadPdo()
  7170. {
  7171. //Method inherited from \Illuminate\Database\Connection
  7172. /** @var \Illuminate\Database\PostgresConnection $instance */
  7173. return $instance->getReadPdo();
  7174. }
  7175. /**
  7176. * Get the current read PDO connection parameter without executing any reconnect logic.
  7177. *
  7178. * @return \PDO|\Closure|null
  7179. * @static
  7180. */
  7181. public static function getRawReadPdo()
  7182. {
  7183. //Method inherited from \Illuminate\Database\Connection
  7184. /** @var \Illuminate\Database\PostgresConnection $instance */
  7185. return $instance->getRawReadPdo();
  7186. }
  7187. /**
  7188. * Set the PDO connection.
  7189. *
  7190. * @param \PDO|\Closure|null $pdo
  7191. * @return \Illuminate\Database\PostgresConnection
  7192. * @static
  7193. */
  7194. public static function setPdo($pdo)
  7195. {
  7196. //Method inherited from \Illuminate\Database\Connection
  7197. /** @var \Illuminate\Database\PostgresConnection $instance */
  7198. return $instance->setPdo($pdo);
  7199. }
  7200. /**
  7201. * Set the PDO connection used for reading.
  7202. *
  7203. * @param \PDO|\Closure|null $pdo
  7204. * @return \Illuminate\Database\PostgresConnection
  7205. * @static
  7206. */
  7207. public static function setReadPdo($pdo)
  7208. {
  7209. //Method inherited from \Illuminate\Database\Connection
  7210. /** @var \Illuminate\Database\PostgresConnection $instance */
  7211. return $instance->setReadPdo($pdo);
  7212. }
  7213. /**
  7214. * Get the database connection name.
  7215. *
  7216. * @return string|null
  7217. * @static
  7218. */
  7219. public static function getName()
  7220. {
  7221. //Method inherited from \Illuminate\Database\Connection
  7222. /** @var \Illuminate\Database\PostgresConnection $instance */
  7223. return $instance->getName();
  7224. }
  7225. /**
  7226. * Get the database connection full name.
  7227. *
  7228. * @return string|null
  7229. * @static
  7230. */
  7231. public static function getNameWithReadWriteType()
  7232. {
  7233. //Method inherited from \Illuminate\Database\Connection
  7234. /** @var \Illuminate\Database\PostgresConnection $instance */
  7235. return $instance->getNameWithReadWriteType();
  7236. }
  7237. /**
  7238. * Get an option from the configuration options.
  7239. *
  7240. * @param string|null $option
  7241. * @return mixed
  7242. * @static
  7243. */
  7244. public static function getConfig($option = null)
  7245. {
  7246. //Method inherited from \Illuminate\Database\Connection
  7247. /** @var \Illuminate\Database\PostgresConnection $instance */
  7248. return $instance->getConfig($option);
  7249. }
  7250. /**
  7251. * Get the PDO driver name.
  7252. *
  7253. * @return string
  7254. * @static
  7255. */
  7256. public static function getDriverName()
  7257. {
  7258. //Method inherited from \Illuminate\Database\Connection
  7259. /** @var \Illuminate\Database\PostgresConnection $instance */
  7260. return $instance->getDriverName();
  7261. }
  7262. /**
  7263. * Get the query grammar used by the connection.
  7264. *
  7265. * @return \Illuminate\Database\Query\Grammars\Grammar
  7266. * @static
  7267. */
  7268. public static function getQueryGrammar()
  7269. {
  7270. //Method inherited from \Illuminate\Database\Connection
  7271. /** @var \Illuminate\Database\PostgresConnection $instance */
  7272. return $instance->getQueryGrammar();
  7273. }
  7274. /**
  7275. * Set the query grammar used by the connection.
  7276. *
  7277. * @param \Illuminate\Database\Query\Grammars\Grammar $grammar
  7278. * @return \Illuminate\Database\PostgresConnection
  7279. * @static
  7280. */
  7281. public static function setQueryGrammar($grammar)
  7282. {
  7283. //Method inherited from \Illuminate\Database\Connection
  7284. /** @var \Illuminate\Database\PostgresConnection $instance */
  7285. return $instance->setQueryGrammar($grammar);
  7286. }
  7287. /**
  7288. * Get the schema grammar used by the connection.
  7289. *
  7290. * @return \Illuminate\Database\Schema\Grammars\Grammar
  7291. * @static
  7292. */
  7293. public static function getSchemaGrammar()
  7294. {
  7295. //Method inherited from \Illuminate\Database\Connection
  7296. /** @var \Illuminate\Database\PostgresConnection $instance */
  7297. return $instance->getSchemaGrammar();
  7298. }
  7299. /**
  7300. * Set the schema grammar used by the connection.
  7301. *
  7302. * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
  7303. * @return \Illuminate\Database\PostgresConnection
  7304. * @static
  7305. */
  7306. public static function setSchemaGrammar($grammar)
  7307. {
  7308. //Method inherited from \Illuminate\Database\Connection
  7309. /** @var \Illuminate\Database\PostgresConnection $instance */
  7310. return $instance->setSchemaGrammar($grammar);
  7311. }
  7312. /**
  7313. * Get the query post processor used by the connection.
  7314. *
  7315. * @return \Illuminate\Database\Query\Processors\Processor
  7316. * @static
  7317. */
  7318. public static function getPostProcessor()
  7319. {
  7320. //Method inherited from \Illuminate\Database\Connection
  7321. /** @var \Illuminate\Database\PostgresConnection $instance */
  7322. return $instance->getPostProcessor();
  7323. }
  7324. /**
  7325. * Set the query post processor used by the connection.
  7326. *
  7327. * @param \Illuminate\Database\Query\Processors\Processor $processor
  7328. * @return \Illuminate\Database\PostgresConnection
  7329. * @static
  7330. */
  7331. public static function setPostProcessor($processor)
  7332. {
  7333. //Method inherited from \Illuminate\Database\Connection
  7334. /** @var \Illuminate\Database\PostgresConnection $instance */
  7335. return $instance->setPostProcessor($processor);
  7336. }
  7337. /**
  7338. * Get the event dispatcher used by the connection.
  7339. *
  7340. * @return \Illuminate\Contracts\Events\Dispatcher
  7341. * @static
  7342. */
  7343. public static function getEventDispatcher()
  7344. {
  7345. //Method inherited from \Illuminate\Database\Connection
  7346. /** @var \Illuminate\Database\PostgresConnection $instance */
  7347. return $instance->getEventDispatcher();
  7348. }
  7349. /**
  7350. * Set the event dispatcher instance on the connection.
  7351. *
  7352. * @param \Illuminate\Contracts\Events\Dispatcher $events
  7353. * @return \Illuminate\Database\PostgresConnection
  7354. * @static
  7355. */
  7356. public static function setEventDispatcher($events)
  7357. {
  7358. //Method inherited from \Illuminate\Database\Connection
  7359. /** @var \Illuminate\Database\PostgresConnection $instance */
  7360. return $instance->setEventDispatcher($events);
  7361. }
  7362. /**
  7363. * Unset the event dispatcher for this connection.
  7364. *
  7365. * @return void
  7366. * @static
  7367. */
  7368. public static function unsetEventDispatcher()
  7369. {
  7370. //Method inherited from \Illuminate\Database\Connection
  7371. /** @var \Illuminate\Database\PostgresConnection $instance */
  7372. $instance->unsetEventDispatcher();
  7373. }
  7374. /**
  7375. * Set the transaction manager instance on the connection.
  7376. *
  7377. * @param \Illuminate\Database\DatabaseTransactionsManager $manager
  7378. * @return \Illuminate\Database\PostgresConnection
  7379. * @static
  7380. */
  7381. public static function setTransactionManager($manager)
  7382. {
  7383. //Method inherited from \Illuminate\Database\Connection
  7384. /** @var \Illuminate\Database\PostgresConnection $instance */
  7385. return $instance->setTransactionManager($manager);
  7386. }
  7387. /**
  7388. * Unset the transaction manager for this connection.
  7389. *
  7390. * @return void
  7391. * @static
  7392. */
  7393. public static function unsetTransactionManager()
  7394. {
  7395. //Method inherited from \Illuminate\Database\Connection
  7396. /** @var \Illuminate\Database\PostgresConnection $instance */
  7397. $instance->unsetTransactionManager();
  7398. }
  7399. /**
  7400. * Determine if the connection is in a "dry run".
  7401. *
  7402. * @return bool
  7403. * @static
  7404. */
  7405. public static function pretending()
  7406. {
  7407. //Method inherited from \Illuminate\Database\Connection
  7408. /** @var \Illuminate\Database\PostgresConnection $instance */
  7409. return $instance->pretending();
  7410. }
  7411. /**
  7412. * Get the connection query log.
  7413. *
  7414. * @return array
  7415. * @static
  7416. */
  7417. public static function getQueryLog()
  7418. {
  7419. //Method inherited from \Illuminate\Database\Connection
  7420. /** @var \Illuminate\Database\PostgresConnection $instance */
  7421. return $instance->getQueryLog();
  7422. }
  7423. /**
  7424. * Get the connection query log with embedded bindings.
  7425. *
  7426. * @return array
  7427. * @static
  7428. */
  7429. public static function getRawQueryLog()
  7430. {
  7431. //Method inherited from \Illuminate\Database\Connection
  7432. /** @var \Illuminate\Database\PostgresConnection $instance */
  7433. return $instance->getRawQueryLog();
  7434. }
  7435. /**
  7436. * Clear the query log.
  7437. *
  7438. * @return void
  7439. * @static
  7440. */
  7441. public static function flushQueryLog()
  7442. {
  7443. //Method inherited from \Illuminate\Database\Connection
  7444. /** @var \Illuminate\Database\PostgresConnection $instance */
  7445. $instance->flushQueryLog();
  7446. }
  7447. /**
  7448. * Enable the query log on the connection.
  7449. *
  7450. * @return void
  7451. * @static
  7452. */
  7453. public static function enableQueryLog()
  7454. {
  7455. //Method inherited from \Illuminate\Database\Connection
  7456. /** @var \Illuminate\Database\PostgresConnection $instance */
  7457. $instance->enableQueryLog();
  7458. }
  7459. /**
  7460. * Disable the query log on the connection.
  7461. *
  7462. * @return void
  7463. * @static
  7464. */
  7465. public static function disableQueryLog()
  7466. {
  7467. //Method inherited from \Illuminate\Database\Connection
  7468. /** @var \Illuminate\Database\PostgresConnection $instance */
  7469. $instance->disableQueryLog();
  7470. }
  7471. /**
  7472. * Determine whether we're logging queries.
  7473. *
  7474. * @return bool
  7475. * @static
  7476. */
  7477. public static function logging()
  7478. {
  7479. //Method inherited from \Illuminate\Database\Connection
  7480. /** @var \Illuminate\Database\PostgresConnection $instance */
  7481. return $instance->logging();
  7482. }
  7483. /**
  7484. * Get the name of the connected database.
  7485. *
  7486. * @return string
  7487. * @static
  7488. */
  7489. public static function getDatabaseName()
  7490. {
  7491. //Method inherited from \Illuminate\Database\Connection
  7492. /** @var \Illuminate\Database\PostgresConnection $instance */
  7493. return $instance->getDatabaseName();
  7494. }
  7495. /**
  7496. * Set the name of the connected database.
  7497. *
  7498. * @param string $database
  7499. * @return \Illuminate\Database\PostgresConnection
  7500. * @static
  7501. */
  7502. public static function setDatabaseName($database)
  7503. {
  7504. //Method inherited from \Illuminate\Database\Connection
  7505. /** @var \Illuminate\Database\PostgresConnection $instance */
  7506. return $instance->setDatabaseName($database);
  7507. }
  7508. /**
  7509. * Set the read / write type of the connection.
  7510. *
  7511. * @param string|null $readWriteType
  7512. * @return \Illuminate\Database\PostgresConnection
  7513. * @static
  7514. */
  7515. public static function setReadWriteType($readWriteType)
  7516. {
  7517. //Method inherited from \Illuminate\Database\Connection
  7518. /** @var \Illuminate\Database\PostgresConnection $instance */
  7519. return $instance->setReadWriteType($readWriteType);
  7520. }
  7521. /**
  7522. * Get the table prefix for the connection.
  7523. *
  7524. * @return string
  7525. * @static
  7526. */
  7527. public static function getTablePrefix()
  7528. {
  7529. //Method inherited from \Illuminate\Database\Connection
  7530. /** @var \Illuminate\Database\PostgresConnection $instance */
  7531. return $instance->getTablePrefix();
  7532. }
  7533. /**
  7534. * Set the table prefix in use by the connection.
  7535. *
  7536. * @param string $prefix
  7537. * @return \Illuminate\Database\PostgresConnection
  7538. * @static
  7539. */
  7540. public static function setTablePrefix($prefix)
  7541. {
  7542. //Method inherited from \Illuminate\Database\Connection
  7543. /** @var \Illuminate\Database\PostgresConnection $instance */
  7544. return $instance->setTablePrefix($prefix);
  7545. }
  7546. /**
  7547. * Execute the given callback without table prefix.
  7548. *
  7549. * @param \Closure $callback
  7550. * @return mixed
  7551. * @static
  7552. */
  7553. public static function withoutTablePrefix($callback)
  7554. {
  7555. //Method inherited from \Illuminate\Database\Connection
  7556. /** @var \Illuminate\Database\PostgresConnection $instance */
  7557. return $instance->withoutTablePrefix($callback);
  7558. }
  7559. /**
  7560. * Get the server version for the connection.
  7561. *
  7562. * @return string
  7563. * @static
  7564. */
  7565. public static function getServerVersion()
  7566. {
  7567. //Method inherited from \Illuminate\Database\Connection
  7568. /** @var \Illuminate\Database\PostgresConnection $instance */
  7569. return $instance->getServerVersion();
  7570. }
  7571. /**
  7572. * Register a connection resolver.
  7573. *
  7574. * @param string $driver
  7575. * @param \Closure $callback
  7576. * @return void
  7577. * @static
  7578. */
  7579. public static function resolverFor($driver, $callback)
  7580. {
  7581. //Method inherited from \Illuminate\Database\Connection
  7582. \Illuminate\Database\PostgresConnection::resolverFor($driver, $callback);
  7583. }
  7584. /**
  7585. * Get the connection resolver for the given driver.
  7586. *
  7587. * @param string $driver
  7588. * @return \Closure|null
  7589. * @static
  7590. */
  7591. public static function getResolver($driver)
  7592. {
  7593. //Method inherited from \Illuminate\Database\Connection
  7594. return \Illuminate\Database\PostgresConnection::getResolver($driver);
  7595. }
  7596. /**
  7597. * @template TReturn of mixed
  7598. *
  7599. * Execute a Closure within a transaction.
  7600. * @param (\Closure(static): TReturn) $callback
  7601. * @param int $attempts
  7602. * @return TReturn
  7603. * @throws \Throwable
  7604. * @static
  7605. */
  7606. public static function transaction($callback, $attempts = 1)
  7607. {
  7608. //Method inherited from \Illuminate\Database\Connection
  7609. /** @var \Illuminate\Database\PostgresConnection $instance */
  7610. return $instance->transaction($callback, $attempts);
  7611. }
  7612. /**
  7613. * Start a new database transaction.
  7614. *
  7615. * @return void
  7616. * @throws \Throwable
  7617. * @static
  7618. */
  7619. public static function beginTransaction()
  7620. {
  7621. //Method inherited from \Illuminate\Database\Connection
  7622. /** @var \Illuminate\Database\PostgresConnection $instance */
  7623. $instance->beginTransaction();
  7624. }
  7625. /**
  7626. * Commit the active database transaction.
  7627. *
  7628. * @return void
  7629. * @throws \Throwable
  7630. * @static
  7631. */
  7632. public static function commit()
  7633. {
  7634. //Method inherited from \Illuminate\Database\Connection
  7635. /** @var \Illuminate\Database\PostgresConnection $instance */
  7636. $instance->commit();
  7637. }
  7638. /**
  7639. * Rollback the active database transaction.
  7640. *
  7641. * @param int|null $toLevel
  7642. * @return void
  7643. * @throws \Throwable
  7644. * @static
  7645. */
  7646. public static function rollBack($toLevel = null)
  7647. {
  7648. //Method inherited from \Illuminate\Database\Connection
  7649. /** @var \Illuminate\Database\PostgresConnection $instance */
  7650. $instance->rollBack($toLevel);
  7651. }
  7652. /**
  7653. * Get the number of active transactions.
  7654. *
  7655. * @return int
  7656. * @static
  7657. */
  7658. public static function transactionLevel()
  7659. {
  7660. //Method inherited from \Illuminate\Database\Connection
  7661. /** @var \Illuminate\Database\PostgresConnection $instance */
  7662. return $instance->transactionLevel();
  7663. }
  7664. /**
  7665. * Execute the callback after a transaction commits.
  7666. *
  7667. * @param callable $callback
  7668. * @return void
  7669. * @throws \RuntimeException
  7670. * @static
  7671. */
  7672. public static function afterCommit($callback)
  7673. {
  7674. //Method inherited from \Illuminate\Database\Connection
  7675. /** @var \Illuminate\Database\PostgresConnection $instance */
  7676. $instance->afterCommit($callback);
  7677. }
  7678. }
  7679. /**
  7680. * @see \Illuminate\Events\Dispatcher
  7681. * @see \Illuminate\Support\Testing\Fakes\EventFake
  7682. */
  7683. class Event {
  7684. /**
  7685. * Register an event listener with the dispatcher.
  7686. *
  7687. * @param \Illuminate\Events\Queued\Closure|callable|array|class-string|string $events
  7688. * @param \Illuminate\Events\Queued\Closure|callable|array|class-string|null $listener
  7689. * @return void
  7690. * @static
  7691. */
  7692. public static function listen($events, $listener = null)
  7693. {
  7694. /** @var \Illuminate\Events\Dispatcher $instance */
  7695. $instance->listen($events, $listener);
  7696. }
  7697. /**
  7698. * Determine if a given event has listeners.
  7699. *
  7700. * @param string $eventName
  7701. * @return bool
  7702. * @static
  7703. */
  7704. public static function hasListeners($eventName)
  7705. {
  7706. /** @var \Illuminate\Events\Dispatcher $instance */
  7707. return $instance->hasListeners($eventName);
  7708. }
  7709. /**
  7710. * Determine if the given event has any wildcard listeners.
  7711. *
  7712. * @param string $eventName
  7713. * @return bool
  7714. * @static
  7715. */
  7716. public static function hasWildcardListeners($eventName)
  7717. {
  7718. /** @var \Illuminate\Events\Dispatcher $instance */
  7719. return $instance->hasWildcardListeners($eventName);
  7720. }
  7721. /**
  7722. * Register an event and payload to be fired later.
  7723. *
  7724. * @param string $event
  7725. * @param object|array $payload
  7726. * @return void
  7727. * @static
  7728. */
  7729. public static function push($event, $payload = [])
  7730. {
  7731. /** @var \Illuminate\Events\Dispatcher $instance */
  7732. $instance->push($event, $payload);
  7733. }
  7734. /**
  7735. * Flush a set of pushed events.
  7736. *
  7737. * @param string $event
  7738. * @return void
  7739. * @static
  7740. */
  7741. public static function flush($event)
  7742. {
  7743. /** @var \Illuminate\Events\Dispatcher $instance */
  7744. $instance->flush($event);
  7745. }
  7746. /**
  7747. * Register an event subscriber with the dispatcher.
  7748. *
  7749. * @param object|string $subscriber
  7750. * @return void
  7751. * @static
  7752. */
  7753. public static function subscribe($subscriber)
  7754. {
  7755. /** @var \Illuminate\Events\Dispatcher $instance */
  7756. $instance->subscribe($subscriber);
  7757. }
  7758. /**
  7759. * Fire an event until the first non-null response is returned.
  7760. *
  7761. * @param string|object $event
  7762. * @param mixed $payload
  7763. * @return mixed
  7764. * @static
  7765. */
  7766. public static function until($event, $payload = [])
  7767. {
  7768. /** @var \Illuminate\Events\Dispatcher $instance */
  7769. return $instance->until($event, $payload);
  7770. }
  7771. /**
  7772. * Fire an event and call the listeners.
  7773. *
  7774. * @param string|object $event
  7775. * @param mixed $payload
  7776. * @param bool $halt
  7777. * @return array|null
  7778. * @static
  7779. */
  7780. public static function dispatch($event, $payload = [], $halt = false)
  7781. {
  7782. /** @var \Illuminate\Events\Dispatcher $instance */
  7783. return $instance->dispatch($event, $payload, $halt);
  7784. }
  7785. /**
  7786. * Get all of the listeners for a given event name.
  7787. *
  7788. * @param string $eventName
  7789. * @return array
  7790. * @static
  7791. */
  7792. public static function getListeners($eventName)
  7793. {
  7794. /** @var \Illuminate\Events\Dispatcher $instance */
  7795. return $instance->getListeners($eventName);
  7796. }
  7797. /**
  7798. * Register an event listener with the dispatcher.
  7799. *
  7800. * @param \Closure|string|array $listener
  7801. * @param bool $wildcard
  7802. * @return \Closure
  7803. * @static
  7804. */
  7805. public static function makeListener($listener, $wildcard = false)
  7806. {
  7807. /** @var \Illuminate\Events\Dispatcher $instance */
  7808. return $instance->makeListener($listener, $wildcard);
  7809. }
  7810. /**
  7811. * Create a class based listener using the IoC container.
  7812. *
  7813. * @param string $listener
  7814. * @param bool $wildcard
  7815. * @return \Closure
  7816. * @static
  7817. */
  7818. public static function createClassListener($listener, $wildcard = false)
  7819. {
  7820. /** @var \Illuminate\Events\Dispatcher $instance */
  7821. return $instance->createClassListener($listener, $wildcard);
  7822. }
  7823. /**
  7824. * Remove a set of listeners from the dispatcher.
  7825. *
  7826. * @param string $event
  7827. * @return void
  7828. * @static
  7829. */
  7830. public static function forget($event)
  7831. {
  7832. /** @var \Illuminate\Events\Dispatcher $instance */
  7833. $instance->forget($event);
  7834. }
  7835. /**
  7836. * Forget all of the pushed listeners.
  7837. *
  7838. * @return void
  7839. * @static
  7840. */
  7841. public static function forgetPushed()
  7842. {
  7843. /** @var \Illuminate\Events\Dispatcher $instance */
  7844. $instance->forgetPushed();
  7845. }
  7846. /**
  7847. * Set the queue resolver implementation.
  7848. *
  7849. * @param callable $resolver
  7850. * @return \Illuminate\Events\Dispatcher
  7851. * @static
  7852. */
  7853. public static function setQueueResolver($resolver)
  7854. {
  7855. /** @var \Illuminate\Events\Dispatcher $instance */
  7856. return $instance->setQueueResolver($resolver);
  7857. }
  7858. /**
  7859. * Set the database transaction manager resolver implementation.
  7860. *
  7861. * @param callable $resolver
  7862. * @return \Illuminate\Events\Dispatcher
  7863. * @static
  7864. */
  7865. public static function setTransactionManagerResolver($resolver)
  7866. {
  7867. /** @var \Illuminate\Events\Dispatcher $instance */
  7868. return $instance->setTransactionManagerResolver($resolver);
  7869. }
  7870. /**
  7871. * Gets the raw, unprepared listeners.
  7872. *
  7873. * @return array
  7874. * @static
  7875. */
  7876. public static function getRawListeners()
  7877. {
  7878. /** @var \Illuminate\Events\Dispatcher $instance */
  7879. return $instance->getRawListeners();
  7880. }
  7881. /**
  7882. * Register a custom macro.
  7883. *
  7884. * @param string $name
  7885. * @param object|callable $macro
  7886. * @param-closure-this static $macro
  7887. * @return void
  7888. * @static
  7889. */
  7890. public static function macro($name, $macro)
  7891. {
  7892. \Illuminate\Events\Dispatcher::macro($name, $macro);
  7893. }
  7894. /**
  7895. * Mix another object into the class.
  7896. *
  7897. * @param object $mixin
  7898. * @param bool $replace
  7899. * @return void
  7900. * @throws \ReflectionException
  7901. * @static
  7902. */
  7903. public static function mixin($mixin, $replace = true)
  7904. {
  7905. \Illuminate\Events\Dispatcher::mixin($mixin, $replace);
  7906. }
  7907. /**
  7908. * Checks if macro is registered.
  7909. *
  7910. * @param string $name
  7911. * @return bool
  7912. * @static
  7913. */
  7914. public static function hasMacro($name)
  7915. {
  7916. return \Illuminate\Events\Dispatcher::hasMacro($name);
  7917. }
  7918. /**
  7919. * Flush the existing macros.
  7920. *
  7921. * @return void
  7922. * @static
  7923. */
  7924. public static function flushMacros()
  7925. {
  7926. \Illuminate\Events\Dispatcher::flushMacros();
  7927. }
  7928. /**
  7929. * Specify the events that should be dispatched instead of faked.
  7930. *
  7931. * @param array|string $eventsToDispatch
  7932. * @return \Illuminate\Support\Testing\Fakes\EventFake
  7933. * @static
  7934. */
  7935. public static function except($eventsToDispatch)
  7936. {
  7937. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7938. return $instance->except($eventsToDispatch);
  7939. }
  7940. /**
  7941. * Assert if an event has a listener attached to it.
  7942. *
  7943. * @param string $expectedEvent
  7944. * @param string|array $expectedListener
  7945. * @return void
  7946. * @static
  7947. */
  7948. public static function assertListening($expectedEvent, $expectedListener)
  7949. {
  7950. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7951. $instance->assertListening($expectedEvent, $expectedListener);
  7952. }
  7953. /**
  7954. * Assert if an event was dispatched based on a truth-test callback.
  7955. *
  7956. * @param string|\Closure $event
  7957. * @param callable|int|null $callback
  7958. * @return void
  7959. * @static
  7960. */
  7961. public static function assertDispatched($event, $callback = null)
  7962. {
  7963. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7964. $instance->assertDispatched($event, $callback);
  7965. }
  7966. /**
  7967. * Assert if an event was dispatched a number of times.
  7968. *
  7969. * @param string $event
  7970. * @param int $times
  7971. * @return void
  7972. * @static
  7973. */
  7974. public static function assertDispatchedTimes($event, $times = 1)
  7975. {
  7976. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7977. $instance->assertDispatchedTimes($event, $times);
  7978. }
  7979. /**
  7980. * Determine if an event was dispatched based on a truth-test callback.
  7981. *
  7982. * @param string|\Closure $event
  7983. * @param callable|null $callback
  7984. * @return void
  7985. * @static
  7986. */
  7987. public static function assertNotDispatched($event, $callback = null)
  7988. {
  7989. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7990. $instance->assertNotDispatched($event, $callback);
  7991. }
  7992. /**
  7993. * Assert that no events were dispatched.
  7994. *
  7995. * @return void
  7996. * @static
  7997. */
  7998. public static function assertNothingDispatched()
  7999. {
  8000. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8001. $instance->assertNothingDispatched();
  8002. }
  8003. /**
  8004. * Get all of the events matching a truth-test callback.
  8005. *
  8006. * @param string $event
  8007. * @param callable|null $callback
  8008. * @return \Illuminate\Support\Collection
  8009. * @static
  8010. */
  8011. public static function dispatched($event, $callback = null)
  8012. {
  8013. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8014. return $instance->dispatched($event, $callback);
  8015. }
  8016. /**
  8017. * Determine if the given event has been dispatched.
  8018. *
  8019. * @param string $event
  8020. * @return bool
  8021. * @static
  8022. */
  8023. public static function hasDispatched($event)
  8024. {
  8025. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8026. return $instance->hasDispatched($event);
  8027. }
  8028. /**
  8029. * Get the events that have been dispatched.
  8030. *
  8031. * @return array
  8032. * @static
  8033. */
  8034. public static function dispatchedEvents()
  8035. {
  8036. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8037. return $instance->dispatchedEvents();
  8038. }
  8039. }
  8040. /**
  8041. * @see \Illuminate\Filesystem\Filesystem
  8042. */
  8043. class File {
  8044. /**
  8045. * Determine if a file or directory exists.
  8046. *
  8047. * @param string $path
  8048. * @return bool
  8049. * @static
  8050. */
  8051. public static function exists($path)
  8052. {
  8053. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8054. return $instance->exists($path);
  8055. }
  8056. /**
  8057. * Determine if a file or directory is missing.
  8058. *
  8059. * @param string $path
  8060. * @return bool
  8061. * @static
  8062. */
  8063. public static function missing($path)
  8064. {
  8065. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8066. return $instance->missing($path);
  8067. }
  8068. /**
  8069. * Get the contents of a file.
  8070. *
  8071. * @param string $path
  8072. * @param bool $lock
  8073. * @return string
  8074. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8075. * @static
  8076. */
  8077. public static function get($path, $lock = false)
  8078. {
  8079. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8080. return $instance->get($path, $lock);
  8081. }
  8082. /**
  8083. * Get the contents of a file as decoded JSON.
  8084. *
  8085. * @param string $path
  8086. * @param int $flags
  8087. * @param bool $lock
  8088. * @return array
  8089. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8090. * @static
  8091. */
  8092. public static function json($path, $flags = 0, $lock = false)
  8093. {
  8094. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8095. return $instance->json($path, $flags, $lock);
  8096. }
  8097. /**
  8098. * Get contents of a file with shared access.
  8099. *
  8100. * @param string $path
  8101. * @return string
  8102. * @static
  8103. */
  8104. public static function sharedGet($path)
  8105. {
  8106. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8107. return $instance->sharedGet($path);
  8108. }
  8109. /**
  8110. * Get the returned value of a file.
  8111. *
  8112. * @param string $path
  8113. * @param array $data
  8114. * @return mixed
  8115. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8116. * @static
  8117. */
  8118. public static function getRequire($path, $data = [])
  8119. {
  8120. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8121. return $instance->getRequire($path, $data);
  8122. }
  8123. /**
  8124. * Require the given file once.
  8125. *
  8126. * @param string $path
  8127. * @param array $data
  8128. * @return mixed
  8129. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8130. * @static
  8131. */
  8132. public static function requireOnce($path, $data = [])
  8133. {
  8134. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8135. return $instance->requireOnce($path, $data);
  8136. }
  8137. /**
  8138. * Get the contents of a file one line at a time.
  8139. *
  8140. * @param string $path
  8141. * @return \Illuminate\Support\LazyCollection
  8142. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8143. * @static
  8144. */
  8145. public static function lines($path)
  8146. {
  8147. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8148. return $instance->lines($path);
  8149. }
  8150. /**
  8151. * Get the hash of the file at the given path.
  8152. *
  8153. * @param string $path
  8154. * @param string $algorithm
  8155. * @return string|false
  8156. * @static
  8157. */
  8158. public static function hash($path, $algorithm = 'md5')
  8159. {
  8160. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8161. return $instance->hash($path, $algorithm);
  8162. }
  8163. /**
  8164. * Write the contents of a file.
  8165. *
  8166. * @param string $path
  8167. * @param string $contents
  8168. * @param bool $lock
  8169. * @return int|bool
  8170. * @static
  8171. */
  8172. public static function put($path, $contents, $lock = false)
  8173. {
  8174. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8175. return $instance->put($path, $contents, $lock);
  8176. }
  8177. /**
  8178. * Write the contents of a file, replacing it atomically if it already exists.
  8179. *
  8180. * @param string $path
  8181. * @param string $content
  8182. * @param int|null $mode
  8183. * @return void
  8184. * @static
  8185. */
  8186. public static function replace($path, $content, $mode = null)
  8187. {
  8188. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8189. $instance->replace($path, $content, $mode);
  8190. }
  8191. /**
  8192. * Replace a given string within a given file.
  8193. *
  8194. * @param array|string $search
  8195. * @param array|string $replace
  8196. * @param string $path
  8197. * @return void
  8198. * @static
  8199. */
  8200. public static function replaceInFile($search, $replace, $path)
  8201. {
  8202. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8203. $instance->replaceInFile($search, $replace, $path);
  8204. }
  8205. /**
  8206. * Prepend to a file.
  8207. *
  8208. * @param string $path
  8209. * @param string $data
  8210. * @return int
  8211. * @static
  8212. */
  8213. public static function prepend($path, $data)
  8214. {
  8215. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8216. return $instance->prepend($path, $data);
  8217. }
  8218. /**
  8219. * Append to a file.
  8220. *
  8221. * @param string $path
  8222. * @param string $data
  8223. * @param bool $lock
  8224. * @return int
  8225. * @static
  8226. */
  8227. public static function append($path, $data, $lock = false)
  8228. {
  8229. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8230. return $instance->append($path, $data, $lock);
  8231. }
  8232. /**
  8233. * Get or set UNIX mode of a file or directory.
  8234. *
  8235. * @param string $path
  8236. * @param int|null $mode
  8237. * @return mixed
  8238. * @static
  8239. */
  8240. public static function chmod($path, $mode = null)
  8241. {
  8242. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8243. return $instance->chmod($path, $mode);
  8244. }
  8245. /**
  8246. * Delete the file at a given path.
  8247. *
  8248. * @param string|array $paths
  8249. * @return bool
  8250. * @static
  8251. */
  8252. public static function delete($paths)
  8253. {
  8254. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8255. return $instance->delete($paths);
  8256. }
  8257. /**
  8258. * Move a file to a new location.
  8259. *
  8260. * @param string $path
  8261. * @param string $target
  8262. * @return bool
  8263. * @static
  8264. */
  8265. public static function move($path, $target)
  8266. {
  8267. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8268. return $instance->move($path, $target);
  8269. }
  8270. /**
  8271. * Copy a file to a new location.
  8272. *
  8273. * @param string $path
  8274. * @param string $target
  8275. * @return bool
  8276. * @static
  8277. */
  8278. public static function copy($path, $target)
  8279. {
  8280. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8281. return $instance->copy($path, $target);
  8282. }
  8283. /**
  8284. * Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file.
  8285. *
  8286. * @param string $target
  8287. * @param string $link
  8288. * @return bool|null
  8289. * @static
  8290. */
  8291. public static function link($target, $link)
  8292. {
  8293. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8294. return $instance->link($target, $link);
  8295. }
  8296. /**
  8297. * Create a relative symlink to the target file or directory.
  8298. *
  8299. * @param string $target
  8300. * @param string $link
  8301. * @return void
  8302. * @throws \RuntimeException
  8303. * @static
  8304. */
  8305. public static function relativeLink($target, $link)
  8306. {
  8307. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8308. $instance->relativeLink($target, $link);
  8309. }
  8310. /**
  8311. * Extract the file name from a file path.
  8312. *
  8313. * @param string $path
  8314. * @return string
  8315. * @static
  8316. */
  8317. public static function name($path)
  8318. {
  8319. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8320. return $instance->name($path);
  8321. }
  8322. /**
  8323. * Extract the trailing name component from a file path.
  8324. *
  8325. * @param string $path
  8326. * @return string
  8327. * @static
  8328. */
  8329. public static function basename($path)
  8330. {
  8331. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8332. return $instance->basename($path);
  8333. }
  8334. /**
  8335. * Extract the parent directory from a file path.
  8336. *
  8337. * @param string $path
  8338. * @return string
  8339. * @static
  8340. */
  8341. public static function dirname($path)
  8342. {
  8343. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8344. return $instance->dirname($path);
  8345. }
  8346. /**
  8347. * Extract the file extension from a file path.
  8348. *
  8349. * @param string $path
  8350. * @return string
  8351. * @static
  8352. */
  8353. public static function extension($path)
  8354. {
  8355. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8356. return $instance->extension($path);
  8357. }
  8358. /**
  8359. * Guess the file extension from the mime-type of a given file.
  8360. *
  8361. * @param string $path
  8362. * @return string|null
  8363. * @throws \RuntimeException
  8364. * @static
  8365. */
  8366. public static function guessExtension($path)
  8367. {
  8368. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8369. return $instance->guessExtension($path);
  8370. }
  8371. /**
  8372. * Get the file type of a given file.
  8373. *
  8374. * @param string $path
  8375. * @return string
  8376. * @static
  8377. */
  8378. public static function type($path)
  8379. {
  8380. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8381. return $instance->type($path);
  8382. }
  8383. /**
  8384. * Get the mime-type of a given file.
  8385. *
  8386. * @param string $path
  8387. * @return string|false
  8388. * @static
  8389. */
  8390. public static function mimeType($path)
  8391. {
  8392. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8393. return $instance->mimeType($path);
  8394. }
  8395. /**
  8396. * Get the file size of a given file.
  8397. *
  8398. * @param string $path
  8399. * @return int
  8400. * @static
  8401. */
  8402. public static function size($path)
  8403. {
  8404. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8405. return $instance->size($path);
  8406. }
  8407. /**
  8408. * Get the file's last modification time.
  8409. *
  8410. * @param string $path
  8411. * @return int
  8412. * @static
  8413. */
  8414. public static function lastModified($path)
  8415. {
  8416. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8417. return $instance->lastModified($path);
  8418. }
  8419. /**
  8420. * Determine if the given path is a directory.
  8421. *
  8422. * @param string $directory
  8423. * @return bool
  8424. * @static
  8425. */
  8426. public static function isDirectory($directory)
  8427. {
  8428. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8429. return $instance->isDirectory($directory);
  8430. }
  8431. /**
  8432. * Determine if the given path is a directory that does not contain any other files or directories.
  8433. *
  8434. * @param string $directory
  8435. * @param bool $ignoreDotFiles
  8436. * @return bool
  8437. * @static
  8438. */
  8439. public static function isEmptyDirectory($directory, $ignoreDotFiles = false)
  8440. {
  8441. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8442. return $instance->isEmptyDirectory($directory, $ignoreDotFiles);
  8443. }
  8444. /**
  8445. * Determine if the given path is readable.
  8446. *
  8447. * @param string $path
  8448. * @return bool
  8449. * @static
  8450. */
  8451. public static function isReadable($path)
  8452. {
  8453. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8454. return $instance->isReadable($path);
  8455. }
  8456. /**
  8457. * Determine if the given path is writable.
  8458. *
  8459. * @param string $path
  8460. * @return bool
  8461. * @static
  8462. */
  8463. public static function isWritable($path)
  8464. {
  8465. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8466. return $instance->isWritable($path);
  8467. }
  8468. /**
  8469. * Determine if two files are the same by comparing their hashes.
  8470. *
  8471. * @param string $firstFile
  8472. * @param string $secondFile
  8473. * @return bool
  8474. * @static
  8475. */
  8476. public static function hasSameHash($firstFile, $secondFile)
  8477. {
  8478. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8479. return $instance->hasSameHash($firstFile, $secondFile);
  8480. }
  8481. /**
  8482. * Determine if the given path is a file.
  8483. *
  8484. * @param string $file
  8485. * @return bool
  8486. * @static
  8487. */
  8488. public static function isFile($file)
  8489. {
  8490. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8491. return $instance->isFile($file);
  8492. }
  8493. /**
  8494. * Find path names matching a given pattern.
  8495. *
  8496. * @param string $pattern
  8497. * @param int $flags
  8498. * @return array
  8499. * @static
  8500. */
  8501. public static function glob($pattern, $flags = 0)
  8502. {
  8503. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8504. return $instance->glob($pattern, $flags);
  8505. }
  8506. /**
  8507. * Get an array of all files in a directory.
  8508. *
  8509. * @param string $directory
  8510. * @param bool $hidden
  8511. * @return \Symfony\Component\Finder\SplFileInfo[]
  8512. * @static
  8513. */
  8514. public static function files($directory, $hidden = false)
  8515. {
  8516. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8517. return $instance->files($directory, $hidden);
  8518. }
  8519. /**
  8520. * Get all of the files from the given directory (recursive).
  8521. *
  8522. * @param string $directory
  8523. * @param bool $hidden
  8524. * @return \Symfony\Component\Finder\SplFileInfo[]
  8525. * @static
  8526. */
  8527. public static function allFiles($directory, $hidden = false)
  8528. {
  8529. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8530. return $instance->allFiles($directory, $hidden);
  8531. }
  8532. /**
  8533. * Get all of the directories within a given directory.
  8534. *
  8535. * @param string $directory
  8536. * @return array
  8537. * @static
  8538. */
  8539. public static function directories($directory)
  8540. {
  8541. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8542. return $instance->directories($directory);
  8543. }
  8544. /**
  8545. * Ensure a directory exists.
  8546. *
  8547. * @param string $path
  8548. * @param int $mode
  8549. * @param bool $recursive
  8550. * @return void
  8551. * @static
  8552. */
  8553. public static function ensureDirectoryExists($path, $mode = 493, $recursive = true)
  8554. {
  8555. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8556. $instance->ensureDirectoryExists($path, $mode, $recursive);
  8557. }
  8558. /**
  8559. * Create a directory.
  8560. *
  8561. * @param string $path
  8562. * @param int $mode
  8563. * @param bool $recursive
  8564. * @param bool $force
  8565. * @return bool
  8566. * @static
  8567. */
  8568. public static function makeDirectory($path, $mode = 493, $recursive = false, $force = false)
  8569. {
  8570. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8571. return $instance->makeDirectory($path, $mode, $recursive, $force);
  8572. }
  8573. /**
  8574. * Move a directory.
  8575. *
  8576. * @param string $from
  8577. * @param string $to
  8578. * @param bool $overwrite
  8579. * @return bool
  8580. * @static
  8581. */
  8582. public static function moveDirectory($from, $to, $overwrite = false)
  8583. {
  8584. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8585. return $instance->moveDirectory($from, $to, $overwrite);
  8586. }
  8587. /**
  8588. * Copy a directory from one location to another.
  8589. *
  8590. * @param string $directory
  8591. * @param string $destination
  8592. * @param int|null $options
  8593. * @return bool
  8594. * @static
  8595. */
  8596. public static function copyDirectory($directory, $destination, $options = null)
  8597. {
  8598. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8599. return $instance->copyDirectory($directory, $destination, $options);
  8600. }
  8601. /**
  8602. * Recursively delete a directory.
  8603. *
  8604. * The directory itself may be optionally preserved.
  8605. *
  8606. * @param string $directory
  8607. * @param bool $preserve
  8608. * @return bool
  8609. * @static
  8610. */
  8611. public static function deleteDirectory($directory, $preserve = false)
  8612. {
  8613. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8614. return $instance->deleteDirectory($directory, $preserve);
  8615. }
  8616. /**
  8617. * Remove all of the directories within a given directory.
  8618. *
  8619. * @param string $directory
  8620. * @return bool
  8621. * @static
  8622. */
  8623. public static function deleteDirectories($directory)
  8624. {
  8625. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8626. return $instance->deleteDirectories($directory);
  8627. }
  8628. /**
  8629. * Empty the specified directory of all files and folders.
  8630. *
  8631. * @param string $directory
  8632. * @return bool
  8633. * @static
  8634. */
  8635. public static function cleanDirectory($directory)
  8636. {
  8637. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8638. return $instance->cleanDirectory($directory);
  8639. }
  8640. /**
  8641. * Apply the callback if the given "value" is (or resolves to) truthy.
  8642. *
  8643. * @template TWhenParameter
  8644. * @template TWhenReturnType
  8645. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  8646. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  8647. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  8648. * @return $this|TWhenReturnType
  8649. * @static
  8650. */
  8651. public static function when($value = null, $callback = null, $default = null)
  8652. {
  8653. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8654. return $instance->when($value, $callback, $default);
  8655. }
  8656. /**
  8657. * Apply the callback if the given "value" is (or resolves to) falsy.
  8658. *
  8659. * @template TUnlessParameter
  8660. * @template TUnlessReturnType
  8661. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  8662. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  8663. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  8664. * @return $this|TUnlessReturnType
  8665. * @static
  8666. */
  8667. public static function unless($value = null, $callback = null, $default = null)
  8668. {
  8669. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8670. return $instance->unless($value, $callback, $default);
  8671. }
  8672. /**
  8673. * Register a custom macro.
  8674. *
  8675. * @param string $name
  8676. * @param object|callable $macro
  8677. * @param-closure-this static $macro
  8678. * @return void
  8679. * @static
  8680. */
  8681. public static function macro($name, $macro)
  8682. {
  8683. \Illuminate\Filesystem\Filesystem::macro($name, $macro);
  8684. }
  8685. /**
  8686. * Mix another object into the class.
  8687. *
  8688. * @param object $mixin
  8689. * @param bool $replace
  8690. * @return void
  8691. * @throws \ReflectionException
  8692. * @static
  8693. */
  8694. public static function mixin($mixin, $replace = true)
  8695. {
  8696. \Illuminate\Filesystem\Filesystem::mixin($mixin, $replace);
  8697. }
  8698. /**
  8699. * Checks if macro is registered.
  8700. *
  8701. * @param string $name
  8702. * @return bool
  8703. * @static
  8704. */
  8705. public static function hasMacro($name)
  8706. {
  8707. return \Illuminate\Filesystem\Filesystem::hasMacro($name);
  8708. }
  8709. /**
  8710. * Flush the existing macros.
  8711. *
  8712. * @return void
  8713. * @static
  8714. */
  8715. public static function flushMacros()
  8716. {
  8717. \Illuminate\Filesystem\Filesystem::flushMacros();
  8718. }
  8719. }
  8720. /**
  8721. * @see \Illuminate\Auth\Access\Gate
  8722. */
  8723. class Gate {
  8724. /**
  8725. * Determine if a given ability has been defined.
  8726. *
  8727. * @param string|array $ability
  8728. * @return bool
  8729. * @static
  8730. */
  8731. public static function has($ability)
  8732. {
  8733. /** @var \Illuminate\Auth\Access\Gate $instance */
  8734. return $instance->has($ability);
  8735. }
  8736. /**
  8737. * Perform an on-demand authorization check. Throw an authorization exception if the condition or callback is false.
  8738. *
  8739. * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition
  8740. * @param string|null $message
  8741. * @param string|null $code
  8742. * @return \Illuminate\Auth\Access\Response
  8743. * @throws \Illuminate\Auth\Access\AuthorizationException
  8744. * @static
  8745. */
  8746. public static function allowIf($condition, $message = null, $code = null)
  8747. {
  8748. /** @var \Illuminate\Auth\Access\Gate $instance */
  8749. return $instance->allowIf($condition, $message, $code);
  8750. }
  8751. /**
  8752. * Perform an on-demand authorization check. Throw an authorization exception if the condition or callback is true.
  8753. *
  8754. * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition
  8755. * @param string|null $message
  8756. * @param string|null $code
  8757. * @return \Illuminate\Auth\Access\Response
  8758. * @throws \Illuminate\Auth\Access\AuthorizationException
  8759. * @static
  8760. */
  8761. public static function denyIf($condition, $message = null, $code = null)
  8762. {
  8763. /** @var \Illuminate\Auth\Access\Gate $instance */
  8764. return $instance->denyIf($condition, $message, $code);
  8765. }
  8766. /**
  8767. * Define a new ability.
  8768. *
  8769. * @param \UnitEnum|string $ability
  8770. * @param callable|array|string $callback
  8771. * @return \Illuminate\Auth\Access\Gate
  8772. * @throws \InvalidArgumentException
  8773. * @static
  8774. */
  8775. public static function define($ability, $callback)
  8776. {
  8777. /** @var \Illuminate\Auth\Access\Gate $instance */
  8778. return $instance->define($ability, $callback);
  8779. }
  8780. /**
  8781. * Define abilities for a resource.
  8782. *
  8783. * @param string $name
  8784. * @param string $class
  8785. * @param array|null $abilities
  8786. * @return \Illuminate\Auth\Access\Gate
  8787. * @static
  8788. */
  8789. public static function resource($name, $class, $abilities = null)
  8790. {
  8791. /** @var \Illuminate\Auth\Access\Gate $instance */
  8792. return $instance->resource($name, $class, $abilities);
  8793. }
  8794. /**
  8795. * Define a policy class for a given class type.
  8796. *
  8797. * @param string $class
  8798. * @param string $policy
  8799. * @return \Illuminate\Auth\Access\Gate
  8800. * @static
  8801. */
  8802. public static function policy($class, $policy)
  8803. {
  8804. /** @var \Illuminate\Auth\Access\Gate $instance */
  8805. return $instance->policy($class, $policy);
  8806. }
  8807. /**
  8808. * Register a callback to run before all Gate checks.
  8809. *
  8810. * @param callable $callback
  8811. * @return \Illuminate\Auth\Access\Gate
  8812. * @static
  8813. */
  8814. public static function before($callback)
  8815. {
  8816. /** @var \Illuminate\Auth\Access\Gate $instance */
  8817. return $instance->before($callback);
  8818. }
  8819. /**
  8820. * Register a callback to run after all Gate checks.
  8821. *
  8822. * @param callable $callback
  8823. * @return \Illuminate\Auth\Access\Gate
  8824. * @static
  8825. */
  8826. public static function after($callback)
  8827. {
  8828. /** @var \Illuminate\Auth\Access\Gate $instance */
  8829. return $instance->after($callback);
  8830. }
  8831. /**
  8832. * Determine if all of the given abilities should be granted for the current user.
  8833. *
  8834. * @param iterable|\UnitEnum|string $ability
  8835. * @param array|mixed $arguments
  8836. * @return bool
  8837. * @static
  8838. */
  8839. public static function allows($ability, $arguments = [])
  8840. {
  8841. /** @var \Illuminate\Auth\Access\Gate $instance */
  8842. return $instance->allows($ability, $arguments);
  8843. }
  8844. /**
  8845. * Determine if any of the given abilities should be denied for the current user.
  8846. *
  8847. * @param iterable|\UnitEnum|string $ability
  8848. * @param array|mixed $arguments
  8849. * @return bool
  8850. * @static
  8851. */
  8852. public static function denies($ability, $arguments = [])
  8853. {
  8854. /** @var \Illuminate\Auth\Access\Gate $instance */
  8855. return $instance->denies($ability, $arguments);
  8856. }
  8857. /**
  8858. * Determine if all of the given abilities should be granted for the current user.
  8859. *
  8860. * @param iterable|\UnitEnum|string $abilities
  8861. * @param array|mixed $arguments
  8862. * @return bool
  8863. * @static
  8864. */
  8865. public static function check($abilities, $arguments = [])
  8866. {
  8867. /** @var \Illuminate\Auth\Access\Gate $instance */
  8868. return $instance->check($abilities, $arguments);
  8869. }
  8870. /**
  8871. * Determine if any one of the given abilities should be granted for the current user.
  8872. *
  8873. * @param iterable|\UnitEnum|string $abilities
  8874. * @param array|mixed $arguments
  8875. * @return bool
  8876. * @static
  8877. */
  8878. public static function any($abilities, $arguments = [])
  8879. {
  8880. /** @var \Illuminate\Auth\Access\Gate $instance */
  8881. return $instance->any($abilities, $arguments);
  8882. }
  8883. /**
  8884. * Determine if all of the given abilities should be denied for the current user.
  8885. *
  8886. * @param iterable|\UnitEnum|string $abilities
  8887. * @param array|mixed $arguments
  8888. * @return bool
  8889. * @static
  8890. */
  8891. public static function none($abilities, $arguments = [])
  8892. {
  8893. /** @var \Illuminate\Auth\Access\Gate $instance */
  8894. return $instance->none($abilities, $arguments);
  8895. }
  8896. /**
  8897. * Determine if the given ability should be granted for the current user.
  8898. *
  8899. * @param \UnitEnum|string $ability
  8900. * @param array|mixed $arguments
  8901. * @return \Illuminate\Auth\Access\Response
  8902. * @throws \Illuminate\Auth\Access\AuthorizationException
  8903. * @static
  8904. */
  8905. public static function authorize($ability, $arguments = [])
  8906. {
  8907. /** @var \Illuminate\Auth\Access\Gate $instance */
  8908. return $instance->authorize($ability, $arguments);
  8909. }
  8910. /**
  8911. * Inspect the user for the given ability.
  8912. *
  8913. * @param \UnitEnum|string $ability
  8914. * @param array|mixed $arguments
  8915. * @return \Illuminate\Auth\Access\Response
  8916. * @static
  8917. */
  8918. public static function inspect($ability, $arguments = [])
  8919. {
  8920. /** @var \Illuminate\Auth\Access\Gate $instance */
  8921. return $instance->inspect($ability, $arguments);
  8922. }
  8923. /**
  8924. * Get the raw result from the authorization callback.
  8925. *
  8926. * @param string $ability
  8927. * @param array|mixed $arguments
  8928. * @return mixed
  8929. * @throws \Illuminate\Auth\Access\AuthorizationException
  8930. * @static
  8931. */
  8932. public static function raw($ability, $arguments = [])
  8933. {
  8934. /** @var \Illuminate\Auth\Access\Gate $instance */
  8935. return $instance->raw($ability, $arguments);
  8936. }
  8937. /**
  8938. * Get a policy instance for a given class.
  8939. *
  8940. * @param object|string $class
  8941. * @return mixed
  8942. * @static
  8943. */
  8944. public static function getPolicyFor($class)
  8945. {
  8946. /** @var \Illuminate\Auth\Access\Gate $instance */
  8947. return $instance->getPolicyFor($class);
  8948. }
  8949. /**
  8950. * Specify a callback to be used to guess policy names.
  8951. *
  8952. * @param callable $callback
  8953. * @return \Illuminate\Auth\Access\Gate
  8954. * @static
  8955. */
  8956. public static function guessPolicyNamesUsing($callback)
  8957. {
  8958. /** @var \Illuminate\Auth\Access\Gate $instance */
  8959. return $instance->guessPolicyNamesUsing($callback);
  8960. }
  8961. /**
  8962. * Build a policy class instance of the given type.
  8963. *
  8964. * @param object|string $class
  8965. * @return mixed
  8966. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  8967. * @static
  8968. */
  8969. public static function resolvePolicy($class)
  8970. {
  8971. /** @var \Illuminate\Auth\Access\Gate $instance */
  8972. return $instance->resolvePolicy($class);
  8973. }
  8974. /**
  8975. * Get a gate instance for the given user.
  8976. *
  8977. * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user
  8978. * @return static
  8979. * @static
  8980. */
  8981. public static function forUser($user)
  8982. {
  8983. /** @var \Illuminate\Auth\Access\Gate $instance */
  8984. return $instance->forUser($user);
  8985. }
  8986. /**
  8987. * Get all of the defined abilities.
  8988. *
  8989. * @return array
  8990. * @static
  8991. */
  8992. public static function abilities()
  8993. {
  8994. /** @var \Illuminate\Auth\Access\Gate $instance */
  8995. return $instance->abilities();
  8996. }
  8997. /**
  8998. * Get all of the defined policies.
  8999. *
  9000. * @return array
  9001. * @static
  9002. */
  9003. public static function policies()
  9004. {
  9005. /** @var \Illuminate\Auth\Access\Gate $instance */
  9006. return $instance->policies();
  9007. }
  9008. /**
  9009. * Set the default denial response for gates and policies.
  9010. *
  9011. * @param \Illuminate\Auth\Access\Response $response
  9012. * @return \Illuminate\Auth\Access\Gate
  9013. * @static
  9014. */
  9015. public static function defaultDenialResponse($response)
  9016. {
  9017. /** @var \Illuminate\Auth\Access\Gate $instance */
  9018. return $instance->defaultDenialResponse($response);
  9019. }
  9020. /**
  9021. * Set the container instance used by the gate.
  9022. *
  9023. * @param \Illuminate\Contracts\Container\Container $container
  9024. * @return \Illuminate\Auth\Access\Gate
  9025. * @static
  9026. */
  9027. public static function setContainer($container)
  9028. {
  9029. /** @var \Illuminate\Auth\Access\Gate $instance */
  9030. return $instance->setContainer($container);
  9031. }
  9032. /**
  9033. * Deny with a HTTP status code.
  9034. *
  9035. * @param int $status
  9036. * @param string|null $message
  9037. * @param int|null $code
  9038. * @return \Illuminate\Auth\Access\Response
  9039. * @static
  9040. */
  9041. public static function denyWithStatus($status, $message = null, $code = null)
  9042. {
  9043. /** @var \Illuminate\Auth\Access\Gate $instance */
  9044. return $instance->denyWithStatus($status, $message, $code);
  9045. }
  9046. /**
  9047. * Deny with a 404 HTTP status code.
  9048. *
  9049. * @param string|null $message
  9050. * @param int|null $code
  9051. * @return \Illuminate\Auth\Access\Response
  9052. * @static
  9053. */
  9054. public static function denyAsNotFound($message = null, $code = null)
  9055. {
  9056. /** @var \Illuminate\Auth\Access\Gate $instance */
  9057. return $instance->denyAsNotFound($message, $code);
  9058. }
  9059. }
  9060. /**
  9061. * @see \Illuminate\Hashing\HashManager
  9062. * @see \Illuminate\Hashing\AbstractHasher
  9063. */
  9064. class Hash {
  9065. /**
  9066. * Create an instance of the Bcrypt hash Driver.
  9067. *
  9068. * @return \Illuminate\Hashing\BcryptHasher
  9069. * @static
  9070. */
  9071. public static function createBcryptDriver()
  9072. {
  9073. /** @var \Illuminate\Hashing\HashManager $instance */
  9074. return $instance->createBcryptDriver();
  9075. }
  9076. /**
  9077. * Create an instance of the Argon2i hash Driver.
  9078. *
  9079. * @return \Illuminate\Hashing\ArgonHasher
  9080. * @static
  9081. */
  9082. public static function createArgonDriver()
  9083. {
  9084. /** @var \Illuminate\Hashing\HashManager $instance */
  9085. return $instance->createArgonDriver();
  9086. }
  9087. /**
  9088. * Create an instance of the Argon2id hash Driver.
  9089. *
  9090. * @return \Illuminate\Hashing\Argon2IdHasher
  9091. * @static
  9092. */
  9093. public static function createArgon2idDriver()
  9094. {
  9095. /** @var \Illuminate\Hashing\HashManager $instance */
  9096. return $instance->createArgon2idDriver();
  9097. }
  9098. /**
  9099. * Get information about the given hashed value.
  9100. *
  9101. * @param string $hashedValue
  9102. * @return array
  9103. * @static
  9104. */
  9105. public static function info($hashedValue)
  9106. {
  9107. /** @var \Illuminate\Hashing\HashManager $instance */
  9108. return $instance->info($hashedValue);
  9109. }
  9110. /**
  9111. * Hash the given value.
  9112. *
  9113. * @param string $value
  9114. * @param array $options
  9115. * @return string
  9116. * @static
  9117. */
  9118. public static function make($value, $options = [])
  9119. {
  9120. /** @var \Illuminate\Hashing\HashManager $instance */
  9121. return $instance->make($value, $options);
  9122. }
  9123. /**
  9124. * Check the given plain value against a hash.
  9125. *
  9126. * @param string $value
  9127. * @param string $hashedValue
  9128. * @param array $options
  9129. * @return bool
  9130. * @static
  9131. */
  9132. public static function check($value, $hashedValue, $options = [])
  9133. {
  9134. /** @var \Illuminate\Hashing\HashManager $instance */
  9135. return $instance->check($value, $hashedValue, $options);
  9136. }
  9137. /**
  9138. * Check if the given hash has been hashed using the given options.
  9139. *
  9140. * @param string $hashedValue
  9141. * @param array $options
  9142. * @return bool
  9143. * @static
  9144. */
  9145. public static function needsRehash($hashedValue, $options = [])
  9146. {
  9147. /** @var \Illuminate\Hashing\HashManager $instance */
  9148. return $instance->needsRehash($hashedValue, $options);
  9149. }
  9150. /**
  9151. * Determine if a given string is already hashed.
  9152. *
  9153. * @param string $value
  9154. * @return bool
  9155. * @static
  9156. */
  9157. public static function isHashed($value)
  9158. {
  9159. /** @var \Illuminate\Hashing\HashManager $instance */
  9160. return $instance->isHashed($value);
  9161. }
  9162. /**
  9163. * Get the default driver name.
  9164. *
  9165. * @return string
  9166. * @static
  9167. */
  9168. public static function getDefaultDriver()
  9169. {
  9170. /** @var \Illuminate\Hashing\HashManager $instance */
  9171. return $instance->getDefaultDriver();
  9172. }
  9173. /**
  9174. * Verifies that the configuration is less than or equal to what is configured.
  9175. *
  9176. * @param array $value
  9177. * @return bool
  9178. * @internal
  9179. * @static
  9180. */
  9181. public static function verifyConfiguration($value)
  9182. {
  9183. /** @var \Illuminate\Hashing\HashManager $instance */
  9184. return $instance->verifyConfiguration($value);
  9185. }
  9186. /**
  9187. * Get a driver instance.
  9188. *
  9189. * @param string|null $driver
  9190. * @return mixed
  9191. * @throws \InvalidArgumentException
  9192. * @static
  9193. */
  9194. public static function driver($driver = null)
  9195. {
  9196. //Method inherited from \Illuminate\Support\Manager
  9197. /** @var \Illuminate\Hashing\HashManager $instance */
  9198. return $instance->driver($driver);
  9199. }
  9200. /**
  9201. * Register a custom driver creator Closure.
  9202. *
  9203. * @param string $driver
  9204. * @param \Closure $callback
  9205. * @return \Illuminate\Hashing\HashManager
  9206. * @static
  9207. */
  9208. public static function extend($driver, $callback)
  9209. {
  9210. //Method inherited from \Illuminate\Support\Manager
  9211. /** @var \Illuminate\Hashing\HashManager $instance */
  9212. return $instance->extend($driver, $callback);
  9213. }
  9214. /**
  9215. * Get all of the created "drivers".
  9216. *
  9217. * @return array
  9218. * @static
  9219. */
  9220. public static function getDrivers()
  9221. {
  9222. //Method inherited from \Illuminate\Support\Manager
  9223. /** @var \Illuminate\Hashing\HashManager $instance */
  9224. return $instance->getDrivers();
  9225. }
  9226. /**
  9227. * Get the container instance used by the manager.
  9228. *
  9229. * @return \Illuminate\Contracts\Container\Container
  9230. * @static
  9231. */
  9232. public static function getContainer()
  9233. {
  9234. //Method inherited from \Illuminate\Support\Manager
  9235. /** @var \Illuminate\Hashing\HashManager $instance */
  9236. return $instance->getContainer();
  9237. }
  9238. /**
  9239. * Set the container instance used by the manager.
  9240. *
  9241. * @param \Illuminate\Contracts\Container\Container $container
  9242. * @return \Illuminate\Hashing\HashManager
  9243. * @static
  9244. */
  9245. public static function setContainer($container)
  9246. {
  9247. //Method inherited from \Illuminate\Support\Manager
  9248. /** @var \Illuminate\Hashing\HashManager $instance */
  9249. return $instance->setContainer($container);
  9250. }
  9251. /**
  9252. * Forget all of the resolved driver instances.
  9253. *
  9254. * @return \Illuminate\Hashing\HashManager
  9255. * @static
  9256. */
  9257. public static function forgetDrivers()
  9258. {
  9259. //Method inherited from \Illuminate\Support\Manager
  9260. /** @var \Illuminate\Hashing\HashManager $instance */
  9261. return $instance->forgetDrivers();
  9262. }
  9263. }
  9264. /**
  9265. * @method static \Illuminate\Http\Client\PendingRequest baseUrl(string $url)
  9266. * @method static \Illuminate\Http\Client\PendingRequest withBody(\Psr\Http\Message\StreamInterface|string $content, string $contentType = 'application/json')
  9267. * @method static \Illuminate\Http\Client\PendingRequest asJson()
  9268. * @method static \Illuminate\Http\Client\PendingRequest asForm()
  9269. * @method static \Illuminate\Http\Client\PendingRequest attach(string|array $name, string|resource $contents = '', string|null $filename = null, array $headers = [])
  9270. * @method static \Illuminate\Http\Client\PendingRequest asMultipart()
  9271. * @method static \Illuminate\Http\Client\PendingRequest bodyFormat(string $format)
  9272. * @method static \Illuminate\Http\Client\PendingRequest withQueryParameters(array $parameters)
  9273. * @method static \Illuminate\Http\Client\PendingRequest contentType(string $contentType)
  9274. * @method static \Illuminate\Http\Client\PendingRequest acceptJson()
  9275. * @method static \Illuminate\Http\Client\PendingRequest accept(string $contentType)
  9276. * @method static \Illuminate\Http\Client\PendingRequest withHeaders(array $headers)
  9277. * @method static \Illuminate\Http\Client\PendingRequest withHeader(string $name, mixed $value)
  9278. * @method static \Illuminate\Http\Client\PendingRequest replaceHeaders(array $headers)
  9279. * @method static \Illuminate\Http\Client\PendingRequest withBasicAuth(string $username, string $password)
  9280. * @method static \Illuminate\Http\Client\PendingRequest withDigestAuth(string $username, string $password)
  9281. * @method static \Illuminate\Http\Client\PendingRequest withToken(string $token, string $type = 'Bearer')
  9282. * @method static \Illuminate\Http\Client\PendingRequest withUserAgent(string|bool $userAgent)
  9283. * @method static \Illuminate\Http\Client\PendingRequest withUrlParameters(array $parameters = [])
  9284. * @method static \Illuminate\Http\Client\PendingRequest withCookies(array $cookies, string $domain)
  9285. * @method static \Illuminate\Http\Client\PendingRequest maxRedirects(int $max)
  9286. * @method static \Illuminate\Http\Client\PendingRequest withoutRedirecting()
  9287. * @method static \Illuminate\Http\Client\PendingRequest withoutVerifying()
  9288. * @method static \Illuminate\Http\Client\PendingRequest sink(string|resource $to)
  9289. * @method static \Illuminate\Http\Client\PendingRequest timeout(int|float $seconds)
  9290. * @method static \Illuminate\Http\Client\PendingRequest connectTimeout(int|float $seconds)
  9291. * @method static \Illuminate\Http\Client\PendingRequest retry(array|int $times, \Closure|int $sleepMilliseconds = 0, callable|null $when = null, bool $throw = true)
  9292. * @method static \Illuminate\Http\Client\PendingRequest withOptions(array $options)
  9293. * @method static \Illuminate\Http\Client\PendingRequest withMiddleware(callable $middleware)
  9294. * @method static \Illuminate\Http\Client\PendingRequest withRequestMiddleware(callable $middleware)
  9295. * @method static \Illuminate\Http\Client\PendingRequest withResponseMiddleware(callable $middleware)
  9296. * @method static \Illuminate\Http\Client\PendingRequest beforeSending(callable $callback)
  9297. * @method static \Illuminate\Http\Client\PendingRequest throw(callable|null $callback = null)
  9298. * @method static \Illuminate\Http\Client\PendingRequest throwIf(callable|bool $condition)
  9299. * @method static \Illuminate\Http\Client\PendingRequest throwUnless(callable|bool $condition)
  9300. * @method static \Illuminate\Http\Client\PendingRequest dump()
  9301. * @method static \Illuminate\Http\Client\PendingRequest dd()
  9302. * @method static \Illuminate\Http\Client\Response get(string $url, array|string|null $query = null)
  9303. * @method static \Illuminate\Http\Client\Response head(string $url, array|string|null $query = null)
  9304. * @method static \Illuminate\Http\Client\Response post(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9305. * @method static \Illuminate\Http\Client\Response patch(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9306. * @method static \Illuminate\Http\Client\Response put(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9307. * @method static \Illuminate\Http\Client\Response delete(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9308. * @method static array pool(callable $callback)
  9309. * @method static \Illuminate\Http\Client\Response send(string $method, string $url, array $options = [])
  9310. * @method static \GuzzleHttp\Client buildClient()
  9311. * @method static \GuzzleHttp\Client createClient(\GuzzleHttp\HandlerStack $handlerStack)
  9312. * @method static \GuzzleHttp\HandlerStack buildHandlerStack()
  9313. * @method static \GuzzleHttp\HandlerStack pushHandlers(\GuzzleHttp\HandlerStack $handlerStack)
  9314. * @method static \Closure buildBeforeSendingHandler()
  9315. * @method static \Closure buildRecorderHandler()
  9316. * @method static \Closure buildStubHandler()
  9317. * @method static \GuzzleHttp\Psr7\RequestInterface runBeforeSendingCallbacks(\GuzzleHttp\Psr7\RequestInterface $request, array $options)
  9318. * @method static array mergeOptions(array ...$options)
  9319. * @method static \Illuminate\Http\Client\PendingRequest stub(callable $callback)
  9320. * @method static \Illuminate\Http\Client\PendingRequest async(bool $async = true)
  9321. * @method static \GuzzleHttp\Promise\PromiseInterface|null getPromise()
  9322. * @method static \Illuminate\Http\Client\PendingRequest truncateExceptionsAt(int $length)
  9323. * @method static \Illuminate\Http\Client\PendingRequest dontTruncateExceptions()
  9324. * @method static \Illuminate\Http\Client\PendingRequest setClient(\GuzzleHttp\Client $client)
  9325. * @method static \Illuminate\Http\Client\PendingRequest setHandler(callable $handler)
  9326. * @method static array getOptions()
  9327. * @method static \Illuminate\Http\Client\PendingRequest|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  9328. * @method static \Illuminate\Http\Client\PendingRequest|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  9329. * @see \Illuminate\Http\Client\Factory
  9330. */
  9331. class Http {
  9332. /**
  9333. * Add middleware to apply to every request.
  9334. *
  9335. * @param callable $middleware
  9336. * @return \Illuminate\Http\Client\Factory
  9337. * @static
  9338. */
  9339. public static function globalMiddleware($middleware)
  9340. {
  9341. /** @var \Illuminate\Http\Client\Factory $instance */
  9342. return $instance->globalMiddleware($middleware);
  9343. }
  9344. /**
  9345. * Add request middleware to apply to every request.
  9346. *
  9347. * @param callable $middleware
  9348. * @return \Illuminate\Http\Client\Factory
  9349. * @static
  9350. */
  9351. public static function globalRequestMiddleware($middleware)
  9352. {
  9353. /** @var \Illuminate\Http\Client\Factory $instance */
  9354. return $instance->globalRequestMiddleware($middleware);
  9355. }
  9356. /**
  9357. * Add response middleware to apply to every request.
  9358. *
  9359. * @param callable $middleware
  9360. * @return \Illuminate\Http\Client\Factory
  9361. * @static
  9362. */
  9363. public static function globalResponseMiddleware($middleware)
  9364. {
  9365. /** @var \Illuminate\Http\Client\Factory $instance */
  9366. return $instance->globalResponseMiddleware($middleware);
  9367. }
  9368. /**
  9369. * Set the options to apply to every request.
  9370. *
  9371. * @param \Closure|array $options
  9372. * @return \Illuminate\Http\Client\Factory
  9373. * @static
  9374. */
  9375. public static function globalOptions($options)
  9376. {
  9377. /** @var \Illuminate\Http\Client\Factory $instance */
  9378. return $instance->globalOptions($options);
  9379. }
  9380. /**
  9381. * Create a new response instance for use during stubbing.
  9382. *
  9383. * @param array|string|null $body
  9384. * @param int $status
  9385. * @param array $headers
  9386. * @return \GuzzleHttp\Promise\PromiseInterface
  9387. * @static
  9388. */
  9389. public static function response($body = null, $status = 200, $headers = [])
  9390. {
  9391. return \Illuminate\Http\Client\Factory::response($body, $status, $headers);
  9392. }
  9393. /**
  9394. * Create a new PSR-7 response instance for use during stubbing.
  9395. *
  9396. * @param array|string|null $body
  9397. * @param int $status
  9398. * @param array<string, mixed> $headers
  9399. * @return \GuzzleHttp\Psr7\Response
  9400. * @static
  9401. */
  9402. public static function psr7Response($body = null, $status = 200, $headers = [])
  9403. {
  9404. return \Illuminate\Http\Client\Factory::psr7Response($body, $status, $headers);
  9405. }
  9406. /**
  9407. * Create a new RequestException instance for use during stubbing.
  9408. *
  9409. * @param array|string|null $body
  9410. * @param int $status
  9411. * @param array<string, mixed> $headers
  9412. * @return \Illuminate\Http\Client\RequestException
  9413. * @static
  9414. */
  9415. public static function failedRequest($body = null, $status = 200, $headers = [])
  9416. {
  9417. return \Illuminate\Http\Client\Factory::failedRequest($body, $status, $headers);
  9418. }
  9419. /**
  9420. * Create a new connection exception for use during stubbing.
  9421. *
  9422. * @param string|null $message
  9423. * @return \Closure(\Illuminate\Http\Client\Request): \GuzzleHttp\Promise\PromiseInterface
  9424. * @static
  9425. */
  9426. public static function failedConnection($message = null)
  9427. {
  9428. return \Illuminate\Http\Client\Factory::failedConnection($message);
  9429. }
  9430. /**
  9431. * Get an invokable object that returns a sequence of responses in order for use during stubbing.
  9432. *
  9433. * @param array $responses
  9434. * @return \Illuminate\Http\Client\ResponseSequence
  9435. * @static
  9436. */
  9437. public static function sequence($responses = [])
  9438. {
  9439. /** @var \Illuminate\Http\Client\Factory $instance */
  9440. return $instance->sequence($responses);
  9441. }
  9442. /**
  9443. * Register a stub callable that will intercept requests and be able to return stub responses.
  9444. *
  9445. * @param callable|array<string, mixed>|null $callback
  9446. * @return \Illuminate\Http\Client\Factory
  9447. * @static
  9448. */
  9449. public static function fake($callback = null)
  9450. {
  9451. /** @var \Illuminate\Http\Client\Factory $instance */
  9452. return $instance->fake($callback);
  9453. }
  9454. /**
  9455. * Register a response sequence for the given URL pattern.
  9456. *
  9457. * @param string $url
  9458. * @return \Illuminate\Http\Client\ResponseSequence
  9459. * @static
  9460. */
  9461. public static function fakeSequence($url = '*')
  9462. {
  9463. /** @var \Illuminate\Http\Client\Factory $instance */
  9464. return $instance->fakeSequence($url);
  9465. }
  9466. /**
  9467. * Stub the given URL using the given callback.
  9468. *
  9469. * @param string $url
  9470. * @param \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface|callable|int|string|array|\Illuminate\Http\Client\ResponseSequence $callback
  9471. * @return \Illuminate\Http\Client\Factory
  9472. * @static
  9473. */
  9474. public static function stubUrl($url, $callback)
  9475. {
  9476. /** @var \Illuminate\Http\Client\Factory $instance */
  9477. return $instance->stubUrl($url, $callback);
  9478. }
  9479. /**
  9480. * Indicate that an exception should be thrown if any request is not faked.
  9481. *
  9482. * @param bool $prevent
  9483. * @return \Illuminate\Http\Client\Factory
  9484. * @static
  9485. */
  9486. public static function preventStrayRequests($prevent = true)
  9487. {
  9488. /** @var \Illuminate\Http\Client\Factory $instance */
  9489. return $instance->preventStrayRequests($prevent);
  9490. }
  9491. /**
  9492. * Determine if stray requests are being prevented.
  9493. *
  9494. * @return bool
  9495. * @static
  9496. */
  9497. public static function preventingStrayRequests()
  9498. {
  9499. /** @var \Illuminate\Http\Client\Factory $instance */
  9500. return $instance->preventingStrayRequests();
  9501. }
  9502. /**
  9503. * Indicate that an exception should not be thrown if any request is not faked.
  9504. *
  9505. * @return \Illuminate\Http\Client\Factory
  9506. * @static
  9507. */
  9508. public static function allowStrayRequests()
  9509. {
  9510. /** @var \Illuminate\Http\Client\Factory $instance */
  9511. return $instance->allowStrayRequests();
  9512. }
  9513. /**
  9514. * Begin recording request / response pairs.
  9515. *
  9516. * @return \Illuminate\Http\Client\Factory
  9517. * @static
  9518. */
  9519. public static function record()
  9520. {
  9521. /** @var \Illuminate\Http\Client\Factory $instance */
  9522. return $instance->record();
  9523. }
  9524. /**
  9525. * Record a request response pair.
  9526. *
  9527. * @param \Illuminate\Http\Client\Request $request
  9528. * @param \Illuminate\Http\Client\Response|null $response
  9529. * @return void
  9530. * @static
  9531. */
  9532. public static function recordRequestResponsePair($request, $response)
  9533. {
  9534. /** @var \Illuminate\Http\Client\Factory $instance */
  9535. $instance->recordRequestResponsePair($request, $response);
  9536. }
  9537. /**
  9538. * Assert that a request / response pair was recorded matching a given truth test.
  9539. *
  9540. * @param callable|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool) $callback
  9541. * @return void
  9542. * @static
  9543. */
  9544. public static function assertSent($callback)
  9545. {
  9546. /** @var \Illuminate\Http\Client\Factory $instance */
  9547. $instance->assertSent($callback);
  9548. }
  9549. /**
  9550. * Assert that the given request was sent in the given order.
  9551. *
  9552. * @param list<string|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool)|callable> $callbacks
  9553. * @return void
  9554. * @static
  9555. */
  9556. public static function assertSentInOrder($callbacks)
  9557. {
  9558. /** @var \Illuminate\Http\Client\Factory $instance */
  9559. $instance->assertSentInOrder($callbacks);
  9560. }
  9561. /**
  9562. * Assert that a request / response pair was not recorded matching a given truth test.
  9563. *
  9564. * @param callable|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool) $callback
  9565. * @return void
  9566. * @static
  9567. */
  9568. public static function assertNotSent($callback)
  9569. {
  9570. /** @var \Illuminate\Http\Client\Factory $instance */
  9571. $instance->assertNotSent($callback);
  9572. }
  9573. /**
  9574. * Assert that no request / response pair was recorded.
  9575. *
  9576. * @return void
  9577. * @static
  9578. */
  9579. public static function assertNothingSent()
  9580. {
  9581. /** @var \Illuminate\Http\Client\Factory $instance */
  9582. $instance->assertNothingSent();
  9583. }
  9584. /**
  9585. * Assert how many requests have been recorded.
  9586. *
  9587. * @param int $count
  9588. * @return void
  9589. * @static
  9590. */
  9591. public static function assertSentCount($count)
  9592. {
  9593. /** @var \Illuminate\Http\Client\Factory $instance */
  9594. $instance->assertSentCount($count);
  9595. }
  9596. /**
  9597. * Assert that every created response sequence is empty.
  9598. *
  9599. * @return void
  9600. * @static
  9601. */
  9602. public static function assertSequencesAreEmpty()
  9603. {
  9604. /** @var \Illuminate\Http\Client\Factory $instance */
  9605. $instance->assertSequencesAreEmpty();
  9606. }
  9607. /**
  9608. * Get a collection of the request / response pairs matching the given truth test.
  9609. *
  9610. * @param (\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool)|callable $callback
  9611. * @return \Illuminate\Support\Collection<int, array{0: \Illuminate\Http\Client\Request, 1: \Illuminate\Http\Client\Response|null}>
  9612. * @static
  9613. */
  9614. public static function recorded($callback = null)
  9615. {
  9616. /** @var \Illuminate\Http\Client\Factory $instance */
  9617. return $instance->recorded($callback);
  9618. }
  9619. /**
  9620. * Create a new pending request instance for this factory.
  9621. *
  9622. * @return \Illuminate\Http\Client\PendingRequest
  9623. * @static
  9624. */
  9625. public static function createPendingRequest()
  9626. {
  9627. /** @var \Illuminate\Http\Client\Factory $instance */
  9628. return $instance->createPendingRequest();
  9629. }
  9630. /**
  9631. * Get the current event dispatcher implementation.
  9632. *
  9633. * @return \Illuminate\Contracts\Events\Dispatcher|null
  9634. * @static
  9635. */
  9636. public static function getDispatcher()
  9637. {
  9638. /** @var \Illuminate\Http\Client\Factory $instance */
  9639. return $instance->getDispatcher();
  9640. }
  9641. /**
  9642. * Get the array of global middleware.
  9643. *
  9644. * @return array
  9645. * @static
  9646. */
  9647. public static function getGlobalMiddleware()
  9648. {
  9649. /** @var \Illuminate\Http\Client\Factory $instance */
  9650. return $instance->getGlobalMiddleware();
  9651. }
  9652. /**
  9653. * Register a custom macro.
  9654. *
  9655. * @param string $name
  9656. * @param object|callable $macro
  9657. * @param-closure-this static $macro
  9658. * @return void
  9659. * @static
  9660. */
  9661. public static function macro($name, $macro)
  9662. {
  9663. \Illuminate\Http\Client\Factory::macro($name, $macro);
  9664. }
  9665. /**
  9666. * Mix another object into the class.
  9667. *
  9668. * @param object $mixin
  9669. * @param bool $replace
  9670. * @return void
  9671. * @throws \ReflectionException
  9672. * @static
  9673. */
  9674. public static function mixin($mixin, $replace = true)
  9675. {
  9676. \Illuminate\Http\Client\Factory::mixin($mixin, $replace);
  9677. }
  9678. /**
  9679. * Checks if macro is registered.
  9680. *
  9681. * @param string $name
  9682. * @return bool
  9683. * @static
  9684. */
  9685. public static function hasMacro($name)
  9686. {
  9687. return \Illuminate\Http\Client\Factory::hasMacro($name);
  9688. }
  9689. /**
  9690. * Flush the existing macros.
  9691. *
  9692. * @return void
  9693. * @static
  9694. */
  9695. public static function flushMacros()
  9696. {
  9697. \Illuminate\Http\Client\Factory::flushMacros();
  9698. }
  9699. /**
  9700. * Dynamically handle calls to the class.
  9701. *
  9702. * @param string $method
  9703. * @param array $parameters
  9704. * @return mixed
  9705. * @throws \BadMethodCallException
  9706. * @static
  9707. */
  9708. public static function macroCall($method, $parameters)
  9709. {
  9710. /** @var \Illuminate\Http\Client\Factory $instance */
  9711. return $instance->macroCall($method, $parameters);
  9712. }
  9713. }
  9714. /**
  9715. * @see \Illuminate\Translation\Translator
  9716. */
  9717. class Lang {
  9718. /**
  9719. * Determine if a translation exists for a given locale.
  9720. *
  9721. * @param string $key
  9722. * @param string|null $locale
  9723. * @return bool
  9724. * @static
  9725. */
  9726. public static function hasForLocale($key, $locale = null)
  9727. {
  9728. /** @var \Illuminate\Translation\Translator $instance */
  9729. return $instance->hasForLocale($key, $locale);
  9730. }
  9731. /**
  9732. * Determine if a translation exists.
  9733. *
  9734. * @param string $key
  9735. * @param string|null $locale
  9736. * @param bool $fallback
  9737. * @return bool
  9738. * @static
  9739. */
  9740. public static function has($key, $locale = null, $fallback = true)
  9741. {
  9742. /** @var \Illuminate\Translation\Translator $instance */
  9743. return $instance->has($key, $locale, $fallback);
  9744. }
  9745. /**
  9746. * Get the translation for the given key.
  9747. *
  9748. * @param string $key
  9749. * @param array $replace
  9750. * @param string|null $locale
  9751. * @param bool $fallback
  9752. * @return string|array
  9753. * @static
  9754. */
  9755. public static function get($key, $replace = [], $locale = null, $fallback = true)
  9756. {
  9757. /** @var \Illuminate\Translation\Translator $instance */
  9758. return $instance->get($key, $replace, $locale, $fallback);
  9759. }
  9760. /**
  9761. * Get a translation according to an integer value.
  9762. *
  9763. * @param string $key
  9764. * @param \Countable|int|float|array $number
  9765. * @param array $replace
  9766. * @param string|null $locale
  9767. * @return string
  9768. * @static
  9769. */
  9770. public static function choice($key, $number, $replace = [], $locale = null)
  9771. {
  9772. /** @var \Illuminate\Translation\Translator $instance */
  9773. return $instance->choice($key, $number, $replace, $locale);
  9774. }
  9775. /**
  9776. * Add translation lines to the given locale.
  9777. *
  9778. * @param array $lines
  9779. * @param string $locale
  9780. * @param string $namespace
  9781. * @return void
  9782. * @static
  9783. */
  9784. public static function addLines($lines, $locale, $namespace = '*')
  9785. {
  9786. /** @var \Illuminate\Translation\Translator $instance */
  9787. $instance->addLines($lines, $locale, $namespace);
  9788. }
  9789. /**
  9790. * Load the specified language group.
  9791. *
  9792. * @param string $namespace
  9793. * @param string $group
  9794. * @param string $locale
  9795. * @return void
  9796. * @static
  9797. */
  9798. public static function load($namespace, $group, $locale)
  9799. {
  9800. /** @var \Illuminate\Translation\Translator $instance */
  9801. $instance->load($namespace, $group, $locale);
  9802. }
  9803. /**
  9804. * Register a callback that is responsible for handling missing translation keys.
  9805. *
  9806. * @param callable|null $callback
  9807. * @return static
  9808. * @static
  9809. */
  9810. public static function handleMissingKeysUsing($callback)
  9811. {
  9812. /** @var \Illuminate\Translation\Translator $instance */
  9813. return $instance->handleMissingKeysUsing($callback);
  9814. }
  9815. /**
  9816. * Add a new namespace to the loader.
  9817. *
  9818. * @param string $namespace
  9819. * @param string $hint
  9820. * @return void
  9821. * @static
  9822. */
  9823. public static function addNamespace($namespace, $hint)
  9824. {
  9825. /** @var \Illuminate\Translation\Translator $instance */
  9826. $instance->addNamespace($namespace, $hint);
  9827. }
  9828. /**
  9829. * Add a new path to the loader.
  9830. *
  9831. * @param string $path
  9832. * @return void
  9833. * @static
  9834. */
  9835. public static function addPath($path)
  9836. {
  9837. /** @var \Illuminate\Translation\Translator $instance */
  9838. $instance->addPath($path);
  9839. }
  9840. /**
  9841. * Add a new JSON path to the loader.
  9842. *
  9843. * @param string $path
  9844. * @return void
  9845. * @static
  9846. */
  9847. public static function addJsonPath($path)
  9848. {
  9849. /** @var \Illuminate\Translation\Translator $instance */
  9850. $instance->addJsonPath($path);
  9851. }
  9852. /**
  9853. * Parse a key into namespace, group, and item.
  9854. *
  9855. * @param string $key
  9856. * @return array
  9857. * @static
  9858. */
  9859. public static function parseKey($key)
  9860. {
  9861. /** @var \Illuminate\Translation\Translator $instance */
  9862. return $instance->parseKey($key);
  9863. }
  9864. /**
  9865. * Specify a callback that should be invoked to determined the applicable locale array.
  9866. *
  9867. * @param callable $callback
  9868. * @return void
  9869. * @static
  9870. */
  9871. public static function determineLocalesUsing($callback)
  9872. {
  9873. /** @var \Illuminate\Translation\Translator $instance */
  9874. $instance->determineLocalesUsing($callback);
  9875. }
  9876. /**
  9877. * Get the message selector instance.
  9878. *
  9879. * @return \Illuminate\Translation\MessageSelector
  9880. * @static
  9881. */
  9882. public static function getSelector()
  9883. {
  9884. /** @var \Illuminate\Translation\Translator $instance */
  9885. return $instance->getSelector();
  9886. }
  9887. /**
  9888. * Set the message selector instance.
  9889. *
  9890. * @param \Illuminate\Translation\MessageSelector $selector
  9891. * @return void
  9892. * @static
  9893. */
  9894. public static function setSelector($selector)
  9895. {
  9896. /** @var \Illuminate\Translation\Translator $instance */
  9897. $instance->setSelector($selector);
  9898. }
  9899. /**
  9900. * Get the language line loader implementation.
  9901. *
  9902. * @return \Illuminate\Contracts\Translation\Loader
  9903. * @static
  9904. */
  9905. public static function getLoader()
  9906. {
  9907. /** @var \Illuminate\Translation\Translator $instance */
  9908. return $instance->getLoader();
  9909. }
  9910. /**
  9911. * Get the default locale being used.
  9912. *
  9913. * @return string
  9914. * @static
  9915. */
  9916. public static function locale()
  9917. {
  9918. /** @var \Illuminate\Translation\Translator $instance */
  9919. return $instance->locale();
  9920. }
  9921. /**
  9922. * Get the default locale being used.
  9923. *
  9924. * @return string
  9925. * @static
  9926. */
  9927. public static function getLocale()
  9928. {
  9929. /** @var \Illuminate\Translation\Translator $instance */
  9930. return $instance->getLocale();
  9931. }
  9932. /**
  9933. * Set the default locale.
  9934. *
  9935. * @param string $locale
  9936. * @return void
  9937. * @throws \InvalidArgumentException
  9938. * @static
  9939. */
  9940. public static function setLocale($locale)
  9941. {
  9942. /** @var \Illuminate\Translation\Translator $instance */
  9943. $instance->setLocale($locale);
  9944. }
  9945. /**
  9946. * Get the fallback locale being used.
  9947. *
  9948. * @return string
  9949. * @static
  9950. */
  9951. public static function getFallback()
  9952. {
  9953. /** @var \Illuminate\Translation\Translator $instance */
  9954. return $instance->getFallback();
  9955. }
  9956. /**
  9957. * Set the fallback locale being used.
  9958. *
  9959. * @param string $fallback
  9960. * @return void
  9961. * @static
  9962. */
  9963. public static function setFallback($fallback)
  9964. {
  9965. /** @var \Illuminate\Translation\Translator $instance */
  9966. $instance->setFallback($fallback);
  9967. }
  9968. /**
  9969. * Set the loaded translation groups.
  9970. *
  9971. * @param array $loaded
  9972. * @return void
  9973. * @static
  9974. */
  9975. public static function setLoaded($loaded)
  9976. {
  9977. /** @var \Illuminate\Translation\Translator $instance */
  9978. $instance->setLoaded($loaded);
  9979. }
  9980. /**
  9981. * Add a handler to be executed in order to format a given class to a string during translation replacements.
  9982. *
  9983. * @param callable|string $class
  9984. * @param callable|null $handler
  9985. * @return void
  9986. * @static
  9987. */
  9988. public static function stringable($class, $handler = null)
  9989. {
  9990. /** @var \Illuminate\Translation\Translator $instance */
  9991. $instance->stringable($class, $handler);
  9992. }
  9993. /**
  9994. * Set the parsed value of a key.
  9995. *
  9996. * @param string $key
  9997. * @param array $parsed
  9998. * @return void
  9999. * @static
  10000. */
  10001. public static function setParsedKey($key, $parsed)
  10002. {
  10003. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  10004. /** @var \Illuminate\Translation\Translator $instance */
  10005. $instance->setParsedKey($key, $parsed);
  10006. }
  10007. /**
  10008. * Flush the cache of parsed keys.
  10009. *
  10010. * @return void
  10011. * @static
  10012. */
  10013. public static function flushParsedKeys()
  10014. {
  10015. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  10016. /** @var \Illuminate\Translation\Translator $instance */
  10017. $instance->flushParsedKeys();
  10018. }
  10019. /**
  10020. * Register a custom macro.
  10021. *
  10022. * @param string $name
  10023. * @param object|callable $macro
  10024. * @param-closure-this static $macro
  10025. * @return void
  10026. * @static
  10027. */
  10028. public static function macro($name, $macro)
  10029. {
  10030. \Illuminate\Translation\Translator::macro($name, $macro);
  10031. }
  10032. /**
  10033. * Mix another object into the class.
  10034. *
  10035. * @param object $mixin
  10036. * @param bool $replace
  10037. * @return void
  10038. * @throws \ReflectionException
  10039. * @static
  10040. */
  10041. public static function mixin($mixin, $replace = true)
  10042. {
  10043. \Illuminate\Translation\Translator::mixin($mixin, $replace);
  10044. }
  10045. /**
  10046. * Checks if macro is registered.
  10047. *
  10048. * @param string $name
  10049. * @return bool
  10050. * @static
  10051. */
  10052. public static function hasMacro($name)
  10053. {
  10054. return \Illuminate\Translation\Translator::hasMacro($name);
  10055. }
  10056. /**
  10057. * Flush the existing macros.
  10058. *
  10059. * @return void
  10060. * @static
  10061. */
  10062. public static function flushMacros()
  10063. {
  10064. \Illuminate\Translation\Translator::flushMacros();
  10065. }
  10066. }
  10067. /**
  10068. * @method static void write(string $level, \Illuminate\Contracts\Support\Arrayable|\Illuminate\Contracts\Support\Jsonable|\Illuminate\Support\Stringable|array|string $message, array $context = [])
  10069. * @method static \Illuminate\Log\Logger withContext(array $context = [])
  10070. * @method static void listen(\Closure $callback)
  10071. * @method static \Psr\Log\LoggerInterface getLogger()
  10072. * @method static \Illuminate\Contracts\Events\Dispatcher getEventDispatcher()
  10073. * @method static void setEventDispatcher(\Illuminate\Contracts\Events\Dispatcher $dispatcher)
  10074. * @method static \Illuminate\Log\Logger|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  10075. * @method static \Illuminate\Log\Logger|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  10076. * @see \Illuminate\Log\LogManager
  10077. */
  10078. class Log {
  10079. /**
  10080. * Build an on-demand log channel.
  10081. *
  10082. * @param array $config
  10083. * @return \Psr\Log\LoggerInterface
  10084. * @static
  10085. */
  10086. public static function build($config)
  10087. {
  10088. /** @var \Illuminate\Log\LogManager $instance */
  10089. return $instance->build($config);
  10090. }
  10091. /**
  10092. * Create a new, on-demand aggregate logger instance.
  10093. *
  10094. * @param array $channels
  10095. * @param string|null $channel
  10096. * @return \Psr\Log\LoggerInterface
  10097. * @static
  10098. */
  10099. public static function stack($channels, $channel = null)
  10100. {
  10101. /** @var \Illuminate\Log\LogManager $instance */
  10102. return $instance->stack($channels, $channel);
  10103. }
  10104. /**
  10105. * Get a log channel instance.
  10106. *
  10107. * @param string|null $channel
  10108. * @return \Psr\Log\LoggerInterface
  10109. * @static
  10110. */
  10111. public static function channel($channel = null)
  10112. {
  10113. /** @var \Illuminate\Log\LogManager $instance */
  10114. return $instance->channel($channel);
  10115. }
  10116. /**
  10117. * Get a log driver instance.
  10118. *
  10119. * @param string|null $driver
  10120. * @return \Psr\Log\LoggerInterface
  10121. * @static
  10122. */
  10123. public static function driver($driver = null)
  10124. {
  10125. /** @var \Illuminate\Log\LogManager $instance */
  10126. return $instance->driver($driver);
  10127. }
  10128. /**
  10129. * Share context across channels and stacks.
  10130. *
  10131. * @param array $context
  10132. * @return \Illuminate\Log\LogManager
  10133. * @static
  10134. */
  10135. public static function shareContext($context)
  10136. {
  10137. /** @var \Illuminate\Log\LogManager $instance */
  10138. return $instance->shareContext($context);
  10139. }
  10140. /**
  10141. * The context shared across channels and stacks.
  10142. *
  10143. * @return array
  10144. * @static
  10145. */
  10146. public static function sharedContext()
  10147. {
  10148. /** @var \Illuminate\Log\LogManager $instance */
  10149. return $instance->sharedContext();
  10150. }
  10151. /**
  10152. * Flush the log context on all currently resolved channels.
  10153. *
  10154. * @param string[]|null $keys
  10155. * @return \Illuminate\Log\LogManager
  10156. * @static
  10157. */
  10158. public static function withoutContext($keys = null)
  10159. {
  10160. /** @var \Illuminate\Log\LogManager $instance */
  10161. return $instance->withoutContext($keys);
  10162. }
  10163. /**
  10164. * Flush the shared context.
  10165. *
  10166. * @return \Illuminate\Log\LogManager
  10167. * @static
  10168. */
  10169. public static function flushSharedContext()
  10170. {
  10171. /** @var \Illuminate\Log\LogManager $instance */
  10172. return $instance->flushSharedContext();
  10173. }
  10174. /**
  10175. * Get the default log driver name.
  10176. *
  10177. * @return string|null
  10178. * @static
  10179. */
  10180. public static function getDefaultDriver()
  10181. {
  10182. /** @var \Illuminate\Log\LogManager $instance */
  10183. return $instance->getDefaultDriver();
  10184. }
  10185. /**
  10186. * Set the default log driver name.
  10187. *
  10188. * @param string $name
  10189. * @return void
  10190. * @static
  10191. */
  10192. public static function setDefaultDriver($name)
  10193. {
  10194. /** @var \Illuminate\Log\LogManager $instance */
  10195. $instance->setDefaultDriver($name);
  10196. }
  10197. /**
  10198. * Register a custom driver creator Closure.
  10199. *
  10200. * @param string $driver
  10201. * @param \Closure $callback
  10202. * @param-closure-this $this $callback
  10203. * @return \Illuminate\Log\LogManager
  10204. * @static
  10205. */
  10206. public static function extend($driver, $callback)
  10207. {
  10208. /** @var \Illuminate\Log\LogManager $instance */
  10209. return $instance->extend($driver, $callback);
  10210. }
  10211. /**
  10212. * Unset the given channel instance.
  10213. *
  10214. * @param string|null $driver
  10215. * @return void
  10216. * @static
  10217. */
  10218. public static function forgetChannel($driver = null)
  10219. {
  10220. /** @var \Illuminate\Log\LogManager $instance */
  10221. $instance->forgetChannel($driver);
  10222. }
  10223. /**
  10224. * Get all of the resolved log channels.
  10225. *
  10226. * @return array
  10227. * @static
  10228. */
  10229. public static function getChannels()
  10230. {
  10231. /** @var \Illuminate\Log\LogManager $instance */
  10232. return $instance->getChannels();
  10233. }
  10234. /**
  10235. * System is unusable.
  10236. *
  10237. * @param string|\Stringable $message
  10238. * @param array $context
  10239. * @return void
  10240. * @static
  10241. */
  10242. public static function emergency($message, $context = [])
  10243. {
  10244. /** @var \Illuminate\Log\LogManager $instance */
  10245. $instance->emergency($message, $context);
  10246. }
  10247. /**
  10248. * Action must be taken immediately.
  10249. *
  10250. * Example: Entire website down, database unavailable, etc. This should
  10251. * trigger the SMS alerts and wake you up.
  10252. *
  10253. * @param string|\Stringable $message
  10254. * @param array $context
  10255. * @return void
  10256. * @static
  10257. */
  10258. public static function alert($message, $context = [])
  10259. {
  10260. /** @var \Illuminate\Log\LogManager $instance */
  10261. $instance->alert($message, $context);
  10262. }
  10263. /**
  10264. * Critical conditions.
  10265. *
  10266. * Example: Application component unavailable, unexpected exception.
  10267. *
  10268. * @param string|\Stringable $message
  10269. * @param array $context
  10270. * @return void
  10271. * @static
  10272. */
  10273. public static function critical($message, $context = [])
  10274. {
  10275. /** @var \Illuminate\Log\LogManager $instance */
  10276. $instance->critical($message, $context);
  10277. }
  10278. /**
  10279. * Runtime errors that do not require immediate action but should typically
  10280. * be logged and monitored.
  10281. *
  10282. * @param string|\Stringable $message
  10283. * @param array $context
  10284. * @return void
  10285. * @static
  10286. */
  10287. public static function error($message, $context = [])
  10288. {
  10289. /** @var \Illuminate\Log\LogManager $instance */
  10290. $instance->error($message, $context);
  10291. }
  10292. /**
  10293. * Exceptional occurrences that are not errors.
  10294. *
  10295. * Example: Use of deprecated APIs, poor use of an API, undesirable things
  10296. * that are not necessarily wrong.
  10297. *
  10298. * @param string|\Stringable $message
  10299. * @param array $context
  10300. * @return void
  10301. * @static
  10302. */
  10303. public static function warning($message, $context = [])
  10304. {
  10305. /** @var \Illuminate\Log\LogManager $instance */
  10306. $instance->warning($message, $context);
  10307. }
  10308. /**
  10309. * Normal but significant events.
  10310. *
  10311. * @param string|\Stringable $message
  10312. * @param array $context
  10313. * @return void
  10314. * @static
  10315. */
  10316. public static function notice($message, $context = [])
  10317. {
  10318. /** @var \Illuminate\Log\LogManager $instance */
  10319. $instance->notice($message, $context);
  10320. }
  10321. /**
  10322. * Interesting events.
  10323. *
  10324. * Example: User logs in, SQL logs.
  10325. *
  10326. * @param string|\Stringable $message
  10327. * @param array $context
  10328. * @return void
  10329. * @static
  10330. */
  10331. public static function info($message, $context = [])
  10332. {
  10333. /** @var \Illuminate\Log\LogManager $instance */
  10334. $instance->info($message, $context);
  10335. }
  10336. /**
  10337. * Detailed debug information.
  10338. *
  10339. * @param string|\Stringable $message
  10340. * @param array $context
  10341. * @return void
  10342. * @static
  10343. */
  10344. public static function debug($message, $context = [])
  10345. {
  10346. /** @var \Illuminate\Log\LogManager $instance */
  10347. $instance->debug($message, $context);
  10348. }
  10349. /**
  10350. * Logs with an arbitrary level.
  10351. *
  10352. * @param mixed $level
  10353. * @param string|\Stringable $message
  10354. * @param array $context
  10355. * @return void
  10356. * @static
  10357. */
  10358. public static function log($level, $message, $context = [])
  10359. {
  10360. /** @var \Illuminate\Log\LogManager $instance */
  10361. $instance->log($level, $message, $context);
  10362. }
  10363. /**
  10364. * Set the application instance used by the manager.
  10365. *
  10366. * @param \Illuminate\Contracts\Foundation\Application $app
  10367. * @return \Illuminate\Log\LogManager
  10368. * @static
  10369. */
  10370. public static function setApplication($app)
  10371. {
  10372. /** @var \Illuminate\Log\LogManager $instance */
  10373. return $instance->setApplication($app);
  10374. }
  10375. }
  10376. /**
  10377. * @method static void alwaysFrom(string $address, string|null $name = null)
  10378. * @method static void alwaysReplyTo(string $address, string|null $name = null)
  10379. * @method static void alwaysReturnPath(string $address)
  10380. * @method static void alwaysTo(string $address, string|null $name = null)
  10381. * @method static \Illuminate\Mail\SentMessage|null html(string $html, mixed $callback)
  10382. * @method static \Illuminate\Mail\SentMessage|null plain(string $view, array $data, mixed $callback)
  10383. * @method static string render(string|array $view, array $data = [])
  10384. * @method static mixed onQueue(\BackedEnum|string|null $queue, \Illuminate\Contracts\Mail\Mailable $view)
  10385. * @method static mixed queueOn(string $queue, \Illuminate\Contracts\Mail\Mailable $view)
  10386. * @method static mixed laterOn(string $queue, \DateTimeInterface|\DateInterval|int $delay, \Illuminate\Contracts\Mail\Mailable $view)
  10387. * @method static \Symfony\Component\Mailer\Transport\TransportInterface getSymfonyTransport()
  10388. * @method static \Illuminate\Contracts\View\Factory getViewFactory()
  10389. * @method static void setSymfonyTransport(\Symfony\Component\Mailer\Transport\TransportInterface $transport)
  10390. * @method static \Illuminate\Mail\Mailer setQueue(\Illuminate\Contracts\Queue\Factory $queue)
  10391. * @method static void macro(string $name, object|callable $macro)
  10392. * @method static void mixin(object $mixin, bool $replace = true)
  10393. * @method static bool hasMacro(string $name)
  10394. * @method static void flushMacros()
  10395. * @see \Illuminate\Mail\MailManager
  10396. * @see \Illuminate\Support\Testing\Fakes\MailFake
  10397. */
  10398. class Mail {
  10399. /**
  10400. * Get a mailer instance by name.
  10401. *
  10402. * @param string|null $name
  10403. * @return \Illuminate\Contracts\Mail\Mailer
  10404. * @static
  10405. */
  10406. public static function mailer($name = null)
  10407. {
  10408. /** @var \Illuminate\Mail\MailManager $instance */
  10409. return $instance->mailer($name);
  10410. }
  10411. /**
  10412. * Get a mailer driver instance.
  10413. *
  10414. * @param string|null $driver
  10415. * @return \Illuminate\Mail\Mailer
  10416. * @static
  10417. */
  10418. public static function driver($driver = null)
  10419. {
  10420. /** @var \Illuminate\Mail\MailManager $instance */
  10421. return $instance->driver($driver);
  10422. }
  10423. /**
  10424. * Build a new mailer instance.
  10425. *
  10426. * @param array $config
  10427. * @return \Illuminate\Mail\Mailer
  10428. * @static
  10429. */
  10430. public static function build($config)
  10431. {
  10432. /** @var \Illuminate\Mail\MailManager $instance */
  10433. return $instance->build($config);
  10434. }
  10435. /**
  10436. * Create a new transport instance.
  10437. *
  10438. * @param array $config
  10439. * @return \Symfony\Component\Mailer\Transport\TransportInterface
  10440. * @throws \InvalidArgumentException
  10441. * @static
  10442. */
  10443. public static function createSymfonyTransport($config)
  10444. {
  10445. /** @var \Illuminate\Mail\MailManager $instance */
  10446. return $instance->createSymfonyTransport($config);
  10447. }
  10448. /**
  10449. * Get the default mail driver name.
  10450. *
  10451. * @return string
  10452. * @static
  10453. */
  10454. public static function getDefaultDriver()
  10455. {
  10456. /** @var \Illuminate\Mail\MailManager $instance */
  10457. return $instance->getDefaultDriver();
  10458. }
  10459. /**
  10460. * Set the default mail driver name.
  10461. *
  10462. * @param string $name
  10463. * @return void
  10464. * @static
  10465. */
  10466. public static function setDefaultDriver($name)
  10467. {
  10468. /** @var \Illuminate\Mail\MailManager $instance */
  10469. $instance->setDefaultDriver($name);
  10470. }
  10471. /**
  10472. * Disconnect the given mailer and remove from local cache.
  10473. *
  10474. * @param string|null $name
  10475. * @return void
  10476. * @static
  10477. */
  10478. public static function purge($name = null)
  10479. {
  10480. /** @var \Illuminate\Mail\MailManager $instance */
  10481. $instance->purge($name);
  10482. }
  10483. /**
  10484. * Register a custom transport creator Closure.
  10485. *
  10486. * @param string $driver
  10487. * @param \Closure $callback
  10488. * @return \Illuminate\Mail\MailManager
  10489. * @static
  10490. */
  10491. public static function extend($driver, $callback)
  10492. {
  10493. /** @var \Illuminate\Mail\MailManager $instance */
  10494. return $instance->extend($driver, $callback);
  10495. }
  10496. /**
  10497. * Get the application instance used by the manager.
  10498. *
  10499. * @return \Illuminate\Contracts\Foundation\Application
  10500. * @static
  10501. */
  10502. public static function getApplication()
  10503. {
  10504. /** @var \Illuminate\Mail\MailManager $instance */
  10505. return $instance->getApplication();
  10506. }
  10507. /**
  10508. * Set the application instance used by the manager.
  10509. *
  10510. * @param \Illuminate\Contracts\Foundation\Application $app
  10511. * @return \Illuminate\Mail\MailManager
  10512. * @static
  10513. */
  10514. public static function setApplication($app)
  10515. {
  10516. /** @var \Illuminate\Mail\MailManager $instance */
  10517. return $instance->setApplication($app);
  10518. }
  10519. /**
  10520. * Forget all of the resolved mailer instances.
  10521. *
  10522. * @return \Illuminate\Mail\MailManager
  10523. * @static
  10524. */
  10525. public static function forgetMailers()
  10526. {
  10527. /** @var \Illuminate\Mail\MailManager $instance */
  10528. return $instance->forgetMailers();
  10529. }
  10530. /**
  10531. * Assert if a mailable was sent based on a truth-test callback.
  10532. *
  10533. * @param string|\Closure $mailable
  10534. * @param callable|array|string|int|null $callback
  10535. * @return void
  10536. * @static
  10537. */
  10538. public static function assertSent($mailable, $callback = null)
  10539. {
  10540. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10541. $instance->assertSent($mailable, $callback);
  10542. }
  10543. /**
  10544. * Determine if a mailable was not sent or queued to be sent based on a truth-test callback.
  10545. *
  10546. * @param string|\Closure $mailable
  10547. * @param callable|null $callback
  10548. * @return void
  10549. * @static
  10550. */
  10551. public static function assertNotOutgoing($mailable, $callback = null)
  10552. {
  10553. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10554. $instance->assertNotOutgoing($mailable, $callback);
  10555. }
  10556. /**
  10557. * Determine if a mailable was not sent based on a truth-test callback.
  10558. *
  10559. * @param string|\Closure $mailable
  10560. * @param callable|array|string|null $callback
  10561. * @return void
  10562. * @static
  10563. */
  10564. public static function assertNotSent($mailable, $callback = null)
  10565. {
  10566. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10567. $instance->assertNotSent($mailable, $callback);
  10568. }
  10569. /**
  10570. * Assert that no mailables were sent or queued to be sent.
  10571. *
  10572. * @return void
  10573. * @static
  10574. */
  10575. public static function assertNothingOutgoing()
  10576. {
  10577. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10578. $instance->assertNothingOutgoing();
  10579. }
  10580. /**
  10581. * Assert that no mailables were sent.
  10582. *
  10583. * @return void
  10584. * @static
  10585. */
  10586. public static function assertNothingSent()
  10587. {
  10588. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10589. $instance->assertNothingSent();
  10590. }
  10591. /**
  10592. * Assert if a mailable was queued based on a truth-test callback.
  10593. *
  10594. * @param string|\Closure $mailable
  10595. * @param callable|array|string|int|null $callback
  10596. * @return void
  10597. * @static
  10598. */
  10599. public static function assertQueued($mailable, $callback = null)
  10600. {
  10601. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10602. $instance->assertQueued($mailable, $callback);
  10603. }
  10604. /**
  10605. * Determine if a mailable was not queued based on a truth-test callback.
  10606. *
  10607. * @param string|\Closure $mailable
  10608. * @param callable|array|string|null $callback
  10609. * @return void
  10610. * @static
  10611. */
  10612. public static function assertNotQueued($mailable, $callback = null)
  10613. {
  10614. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10615. $instance->assertNotQueued($mailable, $callback);
  10616. }
  10617. /**
  10618. * Assert that no mailables were queued.
  10619. *
  10620. * @return void
  10621. * @static
  10622. */
  10623. public static function assertNothingQueued()
  10624. {
  10625. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10626. $instance->assertNothingQueued();
  10627. }
  10628. /**
  10629. * Assert the total number of mailables that were sent.
  10630. *
  10631. * @param int $count
  10632. * @return void
  10633. * @static
  10634. */
  10635. public static function assertSentCount($count)
  10636. {
  10637. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10638. $instance->assertSentCount($count);
  10639. }
  10640. /**
  10641. * Assert the total number of mailables that were queued.
  10642. *
  10643. * @param int $count
  10644. * @return void
  10645. * @static
  10646. */
  10647. public static function assertQueuedCount($count)
  10648. {
  10649. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10650. $instance->assertQueuedCount($count);
  10651. }
  10652. /**
  10653. * Assert the total number of mailables that were sent or queued.
  10654. *
  10655. * @param int $count
  10656. * @return void
  10657. * @static
  10658. */
  10659. public static function assertOutgoingCount($count)
  10660. {
  10661. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10662. $instance->assertOutgoingCount($count);
  10663. }
  10664. /**
  10665. * Get all of the mailables matching a truth-test callback.
  10666. *
  10667. * @param string|\Closure $mailable
  10668. * @param callable|null $callback
  10669. * @return \Illuminate\Support\Collection
  10670. * @static
  10671. */
  10672. public static function sent($mailable, $callback = null)
  10673. {
  10674. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10675. return $instance->sent($mailable, $callback);
  10676. }
  10677. /**
  10678. * Determine if the given mailable has been sent.
  10679. *
  10680. * @param string $mailable
  10681. * @return bool
  10682. * @static
  10683. */
  10684. public static function hasSent($mailable)
  10685. {
  10686. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10687. return $instance->hasSent($mailable);
  10688. }
  10689. /**
  10690. * Get all of the queued mailables matching a truth-test callback.
  10691. *
  10692. * @param string|\Closure $mailable
  10693. * @param callable|null $callback
  10694. * @return \Illuminate\Support\Collection
  10695. * @static
  10696. */
  10697. public static function queued($mailable, $callback = null)
  10698. {
  10699. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10700. return $instance->queued($mailable, $callback);
  10701. }
  10702. /**
  10703. * Determine if the given mailable has been queued.
  10704. *
  10705. * @param string $mailable
  10706. * @return bool
  10707. * @static
  10708. */
  10709. public static function hasQueued($mailable)
  10710. {
  10711. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10712. return $instance->hasQueued($mailable);
  10713. }
  10714. /**
  10715. * Begin the process of mailing a mailable class instance.
  10716. *
  10717. * @param mixed $users
  10718. * @return \Illuminate\Mail\PendingMail
  10719. * @static
  10720. */
  10721. public static function to($users)
  10722. {
  10723. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10724. return $instance->to($users);
  10725. }
  10726. /**
  10727. * Begin the process of mailing a mailable class instance.
  10728. *
  10729. * @param mixed $users
  10730. * @return \Illuminate\Mail\PendingMail
  10731. * @static
  10732. */
  10733. public static function cc($users)
  10734. {
  10735. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10736. return $instance->cc($users);
  10737. }
  10738. /**
  10739. * Begin the process of mailing a mailable class instance.
  10740. *
  10741. * @param mixed $users
  10742. * @return \Illuminate\Mail\PendingMail
  10743. * @static
  10744. */
  10745. public static function bcc($users)
  10746. {
  10747. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10748. return $instance->bcc($users);
  10749. }
  10750. /**
  10751. * Send a new message with only a raw text part.
  10752. *
  10753. * @param string $text
  10754. * @param \Closure|string $callback
  10755. * @return void
  10756. * @static
  10757. */
  10758. public static function raw($text, $callback)
  10759. {
  10760. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10761. $instance->raw($text, $callback);
  10762. }
  10763. /**
  10764. * Send a new message using a view.
  10765. *
  10766. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10767. * @param array $data
  10768. * @param \Closure|string|null $callback
  10769. * @return mixed|void
  10770. * @static
  10771. */
  10772. public static function send($view, $data = [], $callback = null)
  10773. {
  10774. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10775. return $instance->send($view, $data, $callback);
  10776. }
  10777. /**
  10778. * Send a new message synchronously using a view.
  10779. *
  10780. * @param \Illuminate\Contracts\Mail\Mailable|string|array $mailable
  10781. * @param array $data
  10782. * @param \Closure|string|null $callback
  10783. * @return void
  10784. * @static
  10785. */
  10786. public static function sendNow($mailable, $data = [], $callback = null)
  10787. {
  10788. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10789. $instance->sendNow($mailable, $data, $callback);
  10790. }
  10791. /**
  10792. * Queue a new message for sending.
  10793. *
  10794. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10795. * @param string|null $queue
  10796. * @return mixed
  10797. * @static
  10798. */
  10799. public static function queue($view, $queue = null)
  10800. {
  10801. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10802. return $instance->queue($view, $queue);
  10803. }
  10804. /**
  10805. * Queue a new e-mail message for sending after (n) seconds.
  10806. *
  10807. * @param \DateTimeInterface|\DateInterval|int $delay
  10808. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10809. * @param string|null $queue
  10810. * @return mixed
  10811. * @static
  10812. */
  10813. public static function later($delay, $view, $queue = null)
  10814. {
  10815. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10816. return $instance->later($delay, $view, $queue);
  10817. }
  10818. }
  10819. /**
  10820. * @see \Illuminate\Notifications\ChannelManager
  10821. * @see \Illuminate\Support\Testing\Fakes\NotificationFake
  10822. */
  10823. class Notification {
  10824. /**
  10825. * Send the given notification to the given notifiable entities.
  10826. *
  10827. * @param \Illuminate\Support\Collection|array|mixed $notifiables
  10828. * @param mixed $notification
  10829. * @return void
  10830. * @static
  10831. */
  10832. public static function send($notifiables, $notification)
  10833. {
  10834. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10835. $instance->send($notifiables, $notification);
  10836. }
  10837. /**
  10838. * Send the given notification immediately.
  10839. *
  10840. * @param \Illuminate\Support\Collection|array|mixed $notifiables
  10841. * @param mixed $notification
  10842. * @param array|null $channels
  10843. * @return void
  10844. * @static
  10845. */
  10846. public static function sendNow($notifiables, $notification, $channels = null)
  10847. {
  10848. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10849. $instance->sendNow($notifiables, $notification, $channels);
  10850. }
  10851. /**
  10852. * Get a channel instance.
  10853. *
  10854. * @param string|null $name
  10855. * @return mixed
  10856. * @static
  10857. */
  10858. public static function channel($name = null)
  10859. {
  10860. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10861. return $instance->channel($name);
  10862. }
  10863. /**
  10864. * Get the default channel driver name.
  10865. *
  10866. * @return string
  10867. * @static
  10868. */
  10869. public static function getDefaultDriver()
  10870. {
  10871. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10872. return $instance->getDefaultDriver();
  10873. }
  10874. /**
  10875. * Get the default channel driver name.
  10876. *
  10877. * @return string
  10878. * @static
  10879. */
  10880. public static function deliversVia()
  10881. {
  10882. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10883. return $instance->deliversVia();
  10884. }
  10885. /**
  10886. * Set the default channel driver name.
  10887. *
  10888. * @param string $channel
  10889. * @return void
  10890. * @static
  10891. */
  10892. public static function deliverVia($channel)
  10893. {
  10894. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10895. $instance->deliverVia($channel);
  10896. }
  10897. /**
  10898. * Set the locale of notifications.
  10899. *
  10900. * @param string $locale
  10901. * @return \Illuminate\Notifications\ChannelManager
  10902. * @static
  10903. */
  10904. public static function locale($locale)
  10905. {
  10906. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10907. return $instance->locale($locale);
  10908. }
  10909. /**
  10910. * Get a driver instance.
  10911. *
  10912. * @param string|null $driver
  10913. * @return mixed
  10914. * @throws \InvalidArgumentException
  10915. * @static
  10916. */
  10917. public static function driver($driver = null)
  10918. {
  10919. //Method inherited from \Illuminate\Support\Manager
  10920. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10921. return $instance->driver($driver);
  10922. }
  10923. /**
  10924. * Register a custom driver creator Closure.
  10925. *
  10926. * @param string $driver
  10927. * @param \Closure $callback
  10928. * @return \Illuminate\Notifications\ChannelManager
  10929. * @static
  10930. */
  10931. public static function extend($driver, $callback)
  10932. {
  10933. //Method inherited from \Illuminate\Support\Manager
  10934. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10935. return $instance->extend($driver, $callback);
  10936. }
  10937. /**
  10938. * Get all of the created "drivers".
  10939. *
  10940. * @return array
  10941. * @static
  10942. */
  10943. public static function getDrivers()
  10944. {
  10945. //Method inherited from \Illuminate\Support\Manager
  10946. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10947. return $instance->getDrivers();
  10948. }
  10949. /**
  10950. * Get the container instance used by the manager.
  10951. *
  10952. * @return \Illuminate\Contracts\Container\Container
  10953. * @static
  10954. */
  10955. public static function getContainer()
  10956. {
  10957. //Method inherited from \Illuminate\Support\Manager
  10958. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10959. return $instance->getContainer();
  10960. }
  10961. /**
  10962. * Set the container instance used by the manager.
  10963. *
  10964. * @param \Illuminate\Contracts\Container\Container $container
  10965. * @return \Illuminate\Notifications\ChannelManager
  10966. * @static
  10967. */
  10968. public static function setContainer($container)
  10969. {
  10970. //Method inherited from \Illuminate\Support\Manager
  10971. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10972. return $instance->setContainer($container);
  10973. }
  10974. /**
  10975. * Forget all of the resolved driver instances.
  10976. *
  10977. * @return \Illuminate\Notifications\ChannelManager
  10978. * @static
  10979. */
  10980. public static function forgetDrivers()
  10981. {
  10982. //Method inherited from \Illuminate\Support\Manager
  10983. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10984. return $instance->forgetDrivers();
  10985. }
  10986. /**
  10987. * Assert if a notification was sent on-demand based on a truth-test callback.
  10988. *
  10989. * @param string|\Closure $notification
  10990. * @param callable|null $callback
  10991. * @return void
  10992. * @throws \Exception
  10993. * @static
  10994. */
  10995. public static function assertSentOnDemand($notification, $callback = null)
  10996. {
  10997. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  10998. $instance->assertSentOnDemand($notification, $callback);
  10999. }
  11000. /**
  11001. * Assert if a notification was sent based on a truth-test callback.
  11002. *
  11003. * @param mixed $notifiable
  11004. * @param string|\Closure $notification
  11005. * @param callable|null $callback
  11006. * @return void
  11007. * @throws \Exception
  11008. * @static
  11009. */
  11010. public static function assertSentTo($notifiable, $notification, $callback = null)
  11011. {
  11012. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11013. $instance->assertSentTo($notifiable, $notification, $callback);
  11014. }
  11015. /**
  11016. * Assert if a notification was sent on-demand a number of times.
  11017. *
  11018. * @param string $notification
  11019. * @param int $times
  11020. * @return void
  11021. * @static
  11022. */
  11023. public static function assertSentOnDemandTimes($notification, $times = 1)
  11024. {
  11025. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11026. $instance->assertSentOnDemandTimes($notification, $times);
  11027. }
  11028. /**
  11029. * Assert if a notification was sent a number of times.
  11030. *
  11031. * @param mixed $notifiable
  11032. * @param string $notification
  11033. * @param int $times
  11034. * @return void
  11035. * @static
  11036. */
  11037. public static function assertSentToTimes($notifiable, $notification, $times = 1)
  11038. {
  11039. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11040. $instance->assertSentToTimes($notifiable, $notification, $times);
  11041. }
  11042. /**
  11043. * Determine if a notification was sent based on a truth-test callback.
  11044. *
  11045. * @param mixed $notifiable
  11046. * @param string|\Closure $notification
  11047. * @param callable|null $callback
  11048. * @return void
  11049. * @throws \Exception
  11050. * @static
  11051. */
  11052. public static function assertNotSentTo($notifiable, $notification, $callback = null)
  11053. {
  11054. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11055. $instance->assertNotSentTo($notifiable, $notification, $callback);
  11056. }
  11057. /**
  11058. * Assert that no notifications were sent.
  11059. *
  11060. * @return void
  11061. * @static
  11062. */
  11063. public static function assertNothingSent()
  11064. {
  11065. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11066. $instance->assertNothingSent();
  11067. }
  11068. /**
  11069. * Assert that no notifications were sent to the given notifiable.
  11070. *
  11071. * @param mixed $notifiable
  11072. * @return void
  11073. * @throws \Exception
  11074. * @static
  11075. */
  11076. public static function assertNothingSentTo($notifiable)
  11077. {
  11078. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11079. $instance->assertNothingSentTo($notifiable);
  11080. }
  11081. /**
  11082. * Assert the total amount of times a notification was sent.
  11083. *
  11084. * @param string $notification
  11085. * @param int $expectedCount
  11086. * @return void
  11087. * @static
  11088. */
  11089. public static function assertSentTimes($notification, $expectedCount)
  11090. {
  11091. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11092. $instance->assertSentTimes($notification, $expectedCount);
  11093. }
  11094. /**
  11095. * Assert the total count of notification that were sent.
  11096. *
  11097. * @param int $expectedCount
  11098. * @return void
  11099. * @static
  11100. */
  11101. public static function assertCount($expectedCount)
  11102. {
  11103. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11104. $instance->assertCount($expectedCount);
  11105. }
  11106. /**
  11107. * Get all of the notifications matching a truth-test callback.
  11108. *
  11109. * @param mixed $notifiable
  11110. * @param string $notification
  11111. * @param callable|null $callback
  11112. * @return \Illuminate\Support\Collection
  11113. * @static
  11114. */
  11115. public static function sent($notifiable, $notification, $callback = null)
  11116. {
  11117. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11118. return $instance->sent($notifiable, $notification, $callback);
  11119. }
  11120. /**
  11121. * Determine if there are more notifications left to inspect.
  11122. *
  11123. * @param mixed $notifiable
  11124. * @param string $notification
  11125. * @return bool
  11126. * @static
  11127. */
  11128. public static function hasSent($notifiable, $notification)
  11129. {
  11130. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11131. return $instance->hasSent($notifiable, $notification);
  11132. }
  11133. /**
  11134. * Specify if notification should be serialized and restored when being "pushed" to the queue.
  11135. *
  11136. * @param bool $serializeAndRestore
  11137. * @return \Illuminate\Support\Testing\Fakes\NotificationFake
  11138. * @static
  11139. */
  11140. public static function serializeAndRestore($serializeAndRestore = true)
  11141. {
  11142. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11143. return $instance->serializeAndRestore($serializeAndRestore);
  11144. }
  11145. /**
  11146. * Get the notifications that have been sent.
  11147. *
  11148. * @return array
  11149. * @static
  11150. */
  11151. public static function sentNotifications()
  11152. {
  11153. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11154. return $instance->sentNotifications();
  11155. }
  11156. /**
  11157. * Register a custom macro.
  11158. *
  11159. * @param string $name
  11160. * @param object|callable $macro
  11161. * @param-closure-this static $macro
  11162. * @return void
  11163. * @static
  11164. */
  11165. public static function macro($name, $macro)
  11166. {
  11167. \Illuminate\Support\Testing\Fakes\NotificationFake::macro($name, $macro);
  11168. }
  11169. /**
  11170. * Mix another object into the class.
  11171. *
  11172. * @param object $mixin
  11173. * @param bool $replace
  11174. * @return void
  11175. * @throws \ReflectionException
  11176. * @static
  11177. */
  11178. public static function mixin($mixin, $replace = true)
  11179. {
  11180. \Illuminate\Support\Testing\Fakes\NotificationFake::mixin($mixin, $replace);
  11181. }
  11182. /**
  11183. * Checks if macro is registered.
  11184. *
  11185. * @param string $name
  11186. * @return bool
  11187. * @static
  11188. */
  11189. public static function hasMacro($name)
  11190. {
  11191. return \Illuminate\Support\Testing\Fakes\NotificationFake::hasMacro($name);
  11192. }
  11193. /**
  11194. * Flush the existing macros.
  11195. *
  11196. * @return void
  11197. * @static
  11198. */
  11199. public static function flushMacros()
  11200. {
  11201. \Illuminate\Support\Testing\Fakes\NotificationFake::flushMacros();
  11202. }
  11203. }
  11204. /**
  11205. * @method static string sendResetLink(array $credentials, \Closure|null $callback = null)
  11206. * @method static mixed reset(array $credentials, \Closure $callback)
  11207. * @method static \Illuminate\Contracts\Auth\CanResetPassword|null getUser(array $credentials)
  11208. * @method static string createToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
  11209. * @method static void deleteToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
  11210. * @method static bool tokenExists(\Illuminate\Contracts\Auth\CanResetPassword $user, string $token)
  11211. * @method static \Illuminate\Auth\Passwords\TokenRepositoryInterface getRepository()
  11212. * @method static \Illuminate\Support\Timebox getTimebox()
  11213. * @see \Illuminate\Auth\Passwords\PasswordBrokerManager
  11214. * @see \Illuminate\Auth\Passwords\PasswordBroker
  11215. */
  11216. class Password {
  11217. /**
  11218. * Attempt to get the broker from the local cache.
  11219. *
  11220. * @param string|null $name
  11221. * @return \Illuminate\Contracts\Auth\PasswordBroker
  11222. * @static
  11223. */
  11224. public static function broker($name = null)
  11225. {
  11226. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11227. return $instance->broker($name);
  11228. }
  11229. /**
  11230. * Get the default password broker name.
  11231. *
  11232. * @return string
  11233. * @static
  11234. */
  11235. public static function getDefaultDriver()
  11236. {
  11237. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11238. return $instance->getDefaultDriver();
  11239. }
  11240. /**
  11241. * Set the default password broker name.
  11242. *
  11243. * @param string $name
  11244. * @return void
  11245. * @static
  11246. */
  11247. public static function setDefaultDriver($name)
  11248. {
  11249. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11250. $instance->setDefaultDriver($name);
  11251. }
  11252. }
  11253. /**
  11254. * @method static \Illuminate\Process\PendingProcess command(array|string $command)
  11255. * @method static \Illuminate\Process\PendingProcess path(string $path)
  11256. * @method static \Illuminate\Process\PendingProcess timeout(int $timeout)
  11257. * @method static \Illuminate\Process\PendingProcess idleTimeout(int $timeout)
  11258. * @method static \Illuminate\Process\PendingProcess forever()
  11259. * @method static \Illuminate\Process\PendingProcess env(array $environment)
  11260. * @method static \Illuminate\Process\PendingProcess input(\Traversable|resource|string|int|float|bool|null $input)
  11261. * @method static \Illuminate\Process\PendingProcess quietly()
  11262. * @method static \Illuminate\Process\PendingProcess tty(bool $tty = true)
  11263. * @method static \Illuminate\Process\PendingProcess options(array $options)
  11264. * @method static \Illuminate\Contracts\Process\ProcessResult run(array|string|null $command = null, callable|null $output = null)
  11265. * @method static \Illuminate\Process\InvokedProcess start(array|string|null $command = null, callable|null $output = null)
  11266. * @method static bool supportsTty()
  11267. * @method static \Illuminate\Process\PendingProcess withFakeHandlers(array $fakeHandlers)
  11268. * @method static \Illuminate\Process\PendingProcess|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  11269. * @method static \Illuminate\Process\PendingProcess|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  11270. * @see \Illuminate\Process\PendingProcess
  11271. * @see \Illuminate\Process\Factory
  11272. */
  11273. class Process {
  11274. /**
  11275. * Create a new fake process response for testing purposes.
  11276. *
  11277. * @param array|string $output
  11278. * @param array|string $errorOutput
  11279. * @param int $exitCode
  11280. * @return \Illuminate\Process\FakeProcessResult
  11281. * @static
  11282. */
  11283. public static function result($output = '', $errorOutput = '', $exitCode = 0)
  11284. {
  11285. /** @var \Illuminate\Process\Factory $instance */
  11286. return $instance->result($output, $errorOutput, $exitCode);
  11287. }
  11288. /**
  11289. * Begin describing a fake process lifecycle.
  11290. *
  11291. * @return \Illuminate\Process\FakeProcessDescription
  11292. * @static
  11293. */
  11294. public static function describe()
  11295. {
  11296. /** @var \Illuminate\Process\Factory $instance */
  11297. return $instance->describe();
  11298. }
  11299. /**
  11300. * Begin describing a fake process sequence.
  11301. *
  11302. * @param array $processes
  11303. * @return \Illuminate\Process\FakeProcessSequence
  11304. * @static
  11305. */
  11306. public static function sequence($processes = [])
  11307. {
  11308. /** @var \Illuminate\Process\Factory $instance */
  11309. return $instance->sequence($processes);
  11310. }
  11311. /**
  11312. * Indicate that the process factory should fake processes.
  11313. *
  11314. * @param \Closure|array|null $callback
  11315. * @return \Illuminate\Process\Factory
  11316. * @static
  11317. */
  11318. public static function fake($callback = null)
  11319. {
  11320. /** @var \Illuminate\Process\Factory $instance */
  11321. return $instance->fake($callback);
  11322. }
  11323. /**
  11324. * Determine if the process factory has fake process handlers and is recording processes.
  11325. *
  11326. * @return bool
  11327. * @static
  11328. */
  11329. public static function isRecording()
  11330. {
  11331. /** @var \Illuminate\Process\Factory $instance */
  11332. return $instance->isRecording();
  11333. }
  11334. /**
  11335. * Record the given process if processes should be recorded.
  11336. *
  11337. * @param \Illuminate\Process\PendingProcess $process
  11338. * @param \Illuminate\Contracts\Process\ProcessResult $result
  11339. * @return \Illuminate\Process\Factory
  11340. * @static
  11341. */
  11342. public static function recordIfRecording($process, $result)
  11343. {
  11344. /** @var \Illuminate\Process\Factory $instance */
  11345. return $instance->recordIfRecording($process, $result);
  11346. }
  11347. /**
  11348. * Record the given process.
  11349. *
  11350. * @param \Illuminate\Process\PendingProcess $process
  11351. * @param \Illuminate\Contracts\Process\ProcessResult $result
  11352. * @return \Illuminate\Process\Factory
  11353. * @static
  11354. */
  11355. public static function record($process, $result)
  11356. {
  11357. /** @var \Illuminate\Process\Factory $instance */
  11358. return $instance->record($process, $result);
  11359. }
  11360. /**
  11361. * Indicate that an exception should be thrown if any process is not faked.
  11362. *
  11363. * @param bool $prevent
  11364. * @return \Illuminate\Process\Factory
  11365. * @static
  11366. */
  11367. public static function preventStrayProcesses($prevent = true)
  11368. {
  11369. /** @var \Illuminate\Process\Factory $instance */
  11370. return $instance->preventStrayProcesses($prevent);
  11371. }
  11372. /**
  11373. * Determine if stray processes are being prevented.
  11374. *
  11375. * @return bool
  11376. * @static
  11377. */
  11378. public static function preventingStrayProcesses()
  11379. {
  11380. /** @var \Illuminate\Process\Factory $instance */
  11381. return $instance->preventingStrayProcesses();
  11382. }
  11383. /**
  11384. * Assert that a process was recorded matching a given truth test.
  11385. *
  11386. * @param \Closure|string $callback
  11387. * @return \Illuminate\Process\Factory
  11388. * @static
  11389. */
  11390. public static function assertRan($callback)
  11391. {
  11392. /** @var \Illuminate\Process\Factory $instance */
  11393. return $instance->assertRan($callback);
  11394. }
  11395. /**
  11396. * Assert that a process was recorded a given number of times matching a given truth test.
  11397. *
  11398. * @param \Closure|string $callback
  11399. * @param int $times
  11400. * @return \Illuminate\Process\Factory
  11401. * @static
  11402. */
  11403. public static function assertRanTimes($callback, $times = 1)
  11404. {
  11405. /** @var \Illuminate\Process\Factory $instance */
  11406. return $instance->assertRanTimes($callback, $times);
  11407. }
  11408. /**
  11409. * Assert that a process was not recorded matching a given truth test.
  11410. *
  11411. * @param \Closure|string $callback
  11412. * @return \Illuminate\Process\Factory
  11413. * @static
  11414. */
  11415. public static function assertNotRan($callback)
  11416. {
  11417. /** @var \Illuminate\Process\Factory $instance */
  11418. return $instance->assertNotRan($callback);
  11419. }
  11420. /**
  11421. * Assert that a process was not recorded matching a given truth test.
  11422. *
  11423. * @param \Closure|string $callback
  11424. * @return \Illuminate\Process\Factory
  11425. * @static
  11426. */
  11427. public static function assertDidntRun($callback)
  11428. {
  11429. /** @var \Illuminate\Process\Factory $instance */
  11430. return $instance->assertDidntRun($callback);
  11431. }
  11432. /**
  11433. * Assert that no processes were recorded.
  11434. *
  11435. * @return \Illuminate\Process\Factory
  11436. * @static
  11437. */
  11438. public static function assertNothingRan()
  11439. {
  11440. /** @var \Illuminate\Process\Factory $instance */
  11441. return $instance->assertNothingRan();
  11442. }
  11443. /**
  11444. * Start defining a pool of processes.
  11445. *
  11446. * @param callable $callback
  11447. * @return \Illuminate\Process\Pool
  11448. * @static
  11449. */
  11450. public static function pool($callback)
  11451. {
  11452. /** @var \Illuminate\Process\Factory $instance */
  11453. return $instance->pool($callback);
  11454. }
  11455. /**
  11456. * Start defining a series of piped processes.
  11457. *
  11458. * @param callable|array $callback
  11459. * @return \Illuminate\Contracts\Process\ProcessResult
  11460. * @static
  11461. */
  11462. public static function pipe($callback, $output = null)
  11463. {
  11464. /** @var \Illuminate\Process\Factory $instance */
  11465. return $instance->pipe($callback, $output);
  11466. }
  11467. /**
  11468. * Run a pool of processes and wait for them to finish executing.
  11469. *
  11470. * @param callable $callback
  11471. * @param callable|null $output
  11472. * @return \Illuminate\Process\ProcessPoolResults
  11473. * @static
  11474. */
  11475. public static function concurrently($callback, $output = null)
  11476. {
  11477. /** @var \Illuminate\Process\Factory $instance */
  11478. return $instance->concurrently($callback, $output);
  11479. }
  11480. /**
  11481. * Create a new pending process associated with this factory.
  11482. *
  11483. * @return \Illuminate\Process\PendingProcess
  11484. * @static
  11485. */
  11486. public static function newPendingProcess()
  11487. {
  11488. /** @var \Illuminate\Process\Factory $instance */
  11489. return $instance->newPendingProcess();
  11490. }
  11491. /**
  11492. * Register a custom macro.
  11493. *
  11494. * @param string $name
  11495. * @param object|callable $macro
  11496. * @param-closure-this static $macro
  11497. * @return void
  11498. * @static
  11499. */
  11500. public static function macro($name, $macro)
  11501. {
  11502. \Illuminate\Process\Factory::macro($name, $macro);
  11503. }
  11504. /**
  11505. * Mix another object into the class.
  11506. *
  11507. * @param object $mixin
  11508. * @param bool $replace
  11509. * @return void
  11510. * @throws \ReflectionException
  11511. * @static
  11512. */
  11513. public static function mixin($mixin, $replace = true)
  11514. {
  11515. \Illuminate\Process\Factory::mixin($mixin, $replace);
  11516. }
  11517. /**
  11518. * Checks if macro is registered.
  11519. *
  11520. * @param string $name
  11521. * @return bool
  11522. * @static
  11523. */
  11524. public static function hasMacro($name)
  11525. {
  11526. return \Illuminate\Process\Factory::hasMacro($name);
  11527. }
  11528. /**
  11529. * Flush the existing macros.
  11530. *
  11531. * @return void
  11532. * @static
  11533. */
  11534. public static function flushMacros()
  11535. {
  11536. \Illuminate\Process\Factory::flushMacros();
  11537. }
  11538. /**
  11539. * Dynamically handle calls to the class.
  11540. *
  11541. * @param string $method
  11542. * @param array $parameters
  11543. * @return mixed
  11544. * @throws \BadMethodCallException
  11545. * @static
  11546. */
  11547. public static function macroCall($method, $parameters)
  11548. {
  11549. /** @var \Illuminate\Process\Factory $instance */
  11550. return $instance->macroCall($method, $parameters);
  11551. }
  11552. }
  11553. /**
  11554. * @see \Illuminate\Queue\QueueManager
  11555. * @see \Illuminate\Queue\Queue
  11556. * @see \Illuminate\Support\Testing\Fakes\QueueFake
  11557. */
  11558. class Queue {
  11559. /**
  11560. * Register an event listener for the before job event.
  11561. *
  11562. * @param mixed $callback
  11563. * @return void
  11564. * @static
  11565. */
  11566. public static function before($callback)
  11567. {
  11568. /** @var \Illuminate\Queue\QueueManager $instance */
  11569. $instance->before($callback);
  11570. }
  11571. /**
  11572. * Register an event listener for the after job event.
  11573. *
  11574. * @param mixed $callback
  11575. * @return void
  11576. * @static
  11577. */
  11578. public static function after($callback)
  11579. {
  11580. /** @var \Illuminate\Queue\QueueManager $instance */
  11581. $instance->after($callback);
  11582. }
  11583. /**
  11584. * Register an event listener for the exception occurred job event.
  11585. *
  11586. * @param mixed $callback
  11587. * @return void
  11588. * @static
  11589. */
  11590. public static function exceptionOccurred($callback)
  11591. {
  11592. /** @var \Illuminate\Queue\QueueManager $instance */
  11593. $instance->exceptionOccurred($callback);
  11594. }
  11595. /**
  11596. * Register an event listener for the daemon queue loop.
  11597. *
  11598. * @param mixed $callback
  11599. * @return void
  11600. * @static
  11601. */
  11602. public static function looping($callback)
  11603. {
  11604. /** @var \Illuminate\Queue\QueueManager $instance */
  11605. $instance->looping($callback);
  11606. }
  11607. /**
  11608. * Register an event listener for the failed job event.
  11609. *
  11610. * @param mixed $callback
  11611. * @return void
  11612. * @static
  11613. */
  11614. public static function failing($callback)
  11615. {
  11616. /** @var \Illuminate\Queue\QueueManager $instance */
  11617. $instance->failing($callback);
  11618. }
  11619. /**
  11620. * Register an event listener for the daemon queue starting.
  11621. *
  11622. * @param mixed $callback
  11623. * @return void
  11624. * @static
  11625. */
  11626. public static function starting($callback)
  11627. {
  11628. /** @var \Illuminate\Queue\QueueManager $instance */
  11629. $instance->starting($callback);
  11630. }
  11631. /**
  11632. * Register an event listener for the daemon queue stopping.
  11633. *
  11634. * @param mixed $callback
  11635. * @return void
  11636. * @static
  11637. */
  11638. public static function stopping($callback)
  11639. {
  11640. /** @var \Illuminate\Queue\QueueManager $instance */
  11641. $instance->stopping($callback);
  11642. }
  11643. /**
  11644. * Determine if the driver is connected.
  11645. *
  11646. * @param string|null $name
  11647. * @return bool
  11648. * @static
  11649. */
  11650. public static function connected($name = null)
  11651. {
  11652. /** @var \Illuminate\Queue\QueueManager $instance */
  11653. return $instance->connected($name);
  11654. }
  11655. /**
  11656. * Resolve a queue connection instance.
  11657. *
  11658. * @param string|null $name
  11659. * @return \Illuminate\Contracts\Queue\Queue
  11660. * @static
  11661. */
  11662. public static function connection($name = null)
  11663. {
  11664. /** @var \Illuminate\Queue\QueueManager $instance */
  11665. return $instance->connection($name);
  11666. }
  11667. /**
  11668. * Add a queue connection resolver.
  11669. *
  11670. * @param string $driver
  11671. * @param \Closure $resolver
  11672. * @return void
  11673. * @static
  11674. */
  11675. public static function extend($driver, $resolver)
  11676. {
  11677. /** @var \Illuminate\Queue\QueueManager $instance */
  11678. $instance->extend($driver, $resolver);
  11679. }
  11680. /**
  11681. * Add a queue connection resolver.
  11682. *
  11683. * @param string $driver
  11684. * @param \Closure $resolver
  11685. * @return void
  11686. * @static
  11687. */
  11688. public static function addConnector($driver, $resolver)
  11689. {
  11690. /** @var \Illuminate\Queue\QueueManager $instance */
  11691. $instance->addConnector($driver, $resolver);
  11692. }
  11693. /**
  11694. * Get the name of the default queue connection.
  11695. *
  11696. * @return string
  11697. * @static
  11698. */
  11699. public static function getDefaultDriver()
  11700. {
  11701. /** @var \Illuminate\Queue\QueueManager $instance */
  11702. return $instance->getDefaultDriver();
  11703. }
  11704. /**
  11705. * Set the name of the default queue connection.
  11706. *
  11707. * @param string $name
  11708. * @return void
  11709. * @static
  11710. */
  11711. public static function setDefaultDriver($name)
  11712. {
  11713. /** @var \Illuminate\Queue\QueueManager $instance */
  11714. $instance->setDefaultDriver($name);
  11715. }
  11716. /**
  11717. * Get the full name for the given connection.
  11718. *
  11719. * @param string|null $connection
  11720. * @return string
  11721. * @static
  11722. */
  11723. public static function getName($connection = null)
  11724. {
  11725. /** @var \Illuminate\Queue\QueueManager $instance */
  11726. return $instance->getName($connection);
  11727. }
  11728. /**
  11729. * Get the application instance used by the manager.
  11730. *
  11731. * @return \Illuminate\Contracts\Foundation\Application
  11732. * @static
  11733. */
  11734. public static function getApplication()
  11735. {
  11736. /** @var \Illuminate\Queue\QueueManager $instance */
  11737. return $instance->getApplication();
  11738. }
  11739. /**
  11740. * Set the application instance used by the manager.
  11741. *
  11742. * @param \Illuminate\Contracts\Foundation\Application $app
  11743. * @return \Illuminate\Queue\QueueManager
  11744. * @static
  11745. */
  11746. public static function setApplication($app)
  11747. {
  11748. /** @var \Illuminate\Queue\QueueManager $instance */
  11749. return $instance->setApplication($app);
  11750. }
  11751. /**
  11752. * Specify the jobs that should be queued instead of faked.
  11753. *
  11754. * @param array|string $jobsToBeQueued
  11755. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  11756. * @static
  11757. */
  11758. public static function except($jobsToBeQueued)
  11759. {
  11760. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11761. return $instance->except($jobsToBeQueued);
  11762. }
  11763. /**
  11764. * Assert if a job was pushed based on a truth-test callback.
  11765. *
  11766. * @param string|\Closure $job
  11767. * @param callable|int|null $callback
  11768. * @return void
  11769. * @static
  11770. */
  11771. public static function assertPushed($job, $callback = null)
  11772. {
  11773. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11774. $instance->assertPushed($job, $callback);
  11775. }
  11776. /**
  11777. * Assert if a job was pushed based on a truth-test callback.
  11778. *
  11779. * @param string $queue
  11780. * @param string|\Closure $job
  11781. * @param callable|null $callback
  11782. * @return void
  11783. * @static
  11784. */
  11785. public static function assertPushedOn($queue, $job, $callback = null)
  11786. {
  11787. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11788. $instance->assertPushedOn($queue, $job, $callback);
  11789. }
  11790. /**
  11791. * Assert if a job was pushed with chained jobs based on a truth-test callback.
  11792. *
  11793. * @param string $job
  11794. * @param array $expectedChain
  11795. * @param callable|null $callback
  11796. * @return void
  11797. * @static
  11798. */
  11799. public static function assertPushedWithChain($job, $expectedChain = [], $callback = null)
  11800. {
  11801. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11802. $instance->assertPushedWithChain($job, $expectedChain, $callback);
  11803. }
  11804. /**
  11805. * Assert if a job was pushed with an empty chain based on a truth-test callback.
  11806. *
  11807. * @param string $job
  11808. * @param callable|null $callback
  11809. * @return void
  11810. * @static
  11811. */
  11812. public static function assertPushedWithoutChain($job, $callback = null)
  11813. {
  11814. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11815. $instance->assertPushedWithoutChain($job, $callback);
  11816. }
  11817. /**
  11818. * Assert if a closure was pushed based on a truth-test callback.
  11819. *
  11820. * @param callable|int|null $callback
  11821. * @return void
  11822. * @static
  11823. */
  11824. public static function assertClosurePushed($callback = null)
  11825. {
  11826. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11827. $instance->assertClosurePushed($callback);
  11828. }
  11829. /**
  11830. * Assert that a closure was not pushed based on a truth-test callback.
  11831. *
  11832. * @param callable|null $callback
  11833. * @return void
  11834. * @static
  11835. */
  11836. public static function assertClosureNotPushed($callback = null)
  11837. {
  11838. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11839. $instance->assertClosureNotPushed($callback);
  11840. }
  11841. /**
  11842. * Determine if a job was pushed based on a truth-test callback.
  11843. *
  11844. * @param string|\Closure $job
  11845. * @param callable|null $callback
  11846. * @return void
  11847. * @static
  11848. */
  11849. public static function assertNotPushed($job, $callback = null)
  11850. {
  11851. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11852. $instance->assertNotPushed($job, $callback);
  11853. }
  11854. /**
  11855. * Assert the total count of jobs that were pushed.
  11856. *
  11857. * @param int $expectedCount
  11858. * @return void
  11859. * @static
  11860. */
  11861. public static function assertCount($expectedCount)
  11862. {
  11863. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11864. $instance->assertCount($expectedCount);
  11865. }
  11866. /**
  11867. * Assert that no jobs were pushed.
  11868. *
  11869. * @return void
  11870. * @static
  11871. */
  11872. public static function assertNothingPushed()
  11873. {
  11874. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11875. $instance->assertNothingPushed();
  11876. }
  11877. /**
  11878. * Get all of the jobs matching a truth-test callback.
  11879. *
  11880. * @param string $job
  11881. * @param callable|null $callback
  11882. * @return \Illuminate\Support\Collection
  11883. * @static
  11884. */
  11885. public static function pushed($job, $callback = null)
  11886. {
  11887. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11888. return $instance->pushed($job, $callback);
  11889. }
  11890. /**
  11891. * Get all of the raw pushes matching a truth-test callback.
  11892. *
  11893. * @param null|\Closure(string, ?string, array): bool $callback
  11894. * @return \Illuminate\Support\Collection<int, RawPushType>
  11895. * @static
  11896. */
  11897. public static function pushedRaw($callback = null)
  11898. {
  11899. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11900. return $instance->pushedRaw($callback);
  11901. }
  11902. /**
  11903. * Get all of the jobs by listener class, passing an optional truth-test callback.
  11904. *
  11905. * @param class-string $listenerClass
  11906. * @param (\Closure(mixed, \Illuminate\Events\CallQueuedListener, string|null, mixed): bool)|null $callback
  11907. * @return \Illuminate\Support\Collection<int, \Illuminate\Events\CallQueuedListener>
  11908. * @static
  11909. */
  11910. public static function listenersPushed($listenerClass, $callback = null)
  11911. {
  11912. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11913. return $instance->listenersPushed($listenerClass, $callback);
  11914. }
  11915. /**
  11916. * Determine if there are any stored jobs for a given class.
  11917. *
  11918. * @param string $job
  11919. * @return bool
  11920. * @static
  11921. */
  11922. public static function hasPushed($job)
  11923. {
  11924. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11925. return $instance->hasPushed($job);
  11926. }
  11927. /**
  11928. * Get the size of the queue.
  11929. *
  11930. * @param string|null $queue
  11931. * @return int
  11932. * @static
  11933. */
  11934. public static function size($queue = null)
  11935. {
  11936. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11937. return $instance->size($queue);
  11938. }
  11939. /**
  11940. * Get the number of pending jobs.
  11941. *
  11942. * @param string|null $queue
  11943. * @return int
  11944. * @static
  11945. */
  11946. public static function pendingSize($queue = null)
  11947. {
  11948. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11949. return $instance->pendingSize($queue);
  11950. }
  11951. /**
  11952. * Get the number of delayed jobs.
  11953. *
  11954. * @param string|null $queue
  11955. * @return int
  11956. * @static
  11957. */
  11958. public static function delayedSize($queue = null)
  11959. {
  11960. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11961. return $instance->delayedSize($queue);
  11962. }
  11963. /**
  11964. * Get the number of reserved jobs.
  11965. *
  11966. * @param string|null $queue
  11967. * @return int
  11968. * @static
  11969. */
  11970. public static function reservedSize($queue = null)
  11971. {
  11972. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11973. return $instance->reservedSize($queue);
  11974. }
  11975. /**
  11976. * Get the creation timestamp of the oldest pending job, excluding delayed jobs.
  11977. *
  11978. * @param string|null $queue
  11979. * @return int|null
  11980. * @static
  11981. */
  11982. public static function creationTimeOfOldestPendingJob($queue = null)
  11983. {
  11984. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11985. return $instance->creationTimeOfOldestPendingJob($queue);
  11986. }
  11987. /**
  11988. * Push a new job onto the queue.
  11989. *
  11990. * @param string|object $job
  11991. * @param mixed $data
  11992. * @param string|null $queue
  11993. * @return mixed
  11994. * @static
  11995. */
  11996. public static function push($job, $data = '', $queue = null)
  11997. {
  11998. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11999. return $instance->push($job, $data, $queue);
  12000. }
  12001. /**
  12002. * Determine if a job should be faked or actually dispatched.
  12003. *
  12004. * @param object $job
  12005. * @return bool
  12006. * @static
  12007. */
  12008. public static function shouldFakeJob($job)
  12009. {
  12010. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12011. return $instance->shouldFakeJob($job);
  12012. }
  12013. /**
  12014. * Push a raw payload onto the queue.
  12015. *
  12016. * @param string $payload
  12017. * @param string|null $queue
  12018. * @param array $options
  12019. * @return mixed
  12020. * @static
  12021. */
  12022. public static function pushRaw($payload, $queue = null, $options = [])
  12023. {
  12024. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12025. return $instance->pushRaw($payload, $queue, $options);
  12026. }
  12027. /**
  12028. * Push a new job onto the queue after (n) seconds.
  12029. *
  12030. * @param \DateTimeInterface|\DateInterval|int $delay
  12031. * @param string|object $job
  12032. * @param mixed $data
  12033. * @param string|null $queue
  12034. * @return mixed
  12035. * @static
  12036. */
  12037. public static function later($delay, $job, $data = '', $queue = null)
  12038. {
  12039. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12040. return $instance->later($delay, $job, $data, $queue);
  12041. }
  12042. /**
  12043. * Push a new job onto the queue.
  12044. *
  12045. * @param string $queue
  12046. * @param string|object $job
  12047. * @param mixed $data
  12048. * @return mixed
  12049. * @static
  12050. */
  12051. public static function pushOn($queue, $job, $data = '')
  12052. {
  12053. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12054. return $instance->pushOn($queue, $job, $data);
  12055. }
  12056. /**
  12057. * Push a new job onto a specific queue after (n) seconds.
  12058. *
  12059. * @param string $queue
  12060. * @param \DateTimeInterface|\DateInterval|int $delay
  12061. * @param string|object $job
  12062. * @param mixed $data
  12063. * @return mixed
  12064. * @static
  12065. */
  12066. public static function laterOn($queue, $delay, $job, $data = '')
  12067. {
  12068. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12069. return $instance->laterOn($queue, $delay, $job, $data);
  12070. }
  12071. /**
  12072. * Pop the next job off of the queue.
  12073. *
  12074. * @param string|null $queue
  12075. * @return \Illuminate\Contracts\Queue\Job|null
  12076. * @static
  12077. */
  12078. public static function pop($queue = null)
  12079. {
  12080. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12081. return $instance->pop($queue);
  12082. }
  12083. /**
  12084. * Push an array of jobs onto the queue.
  12085. *
  12086. * @param array $jobs
  12087. * @param mixed $data
  12088. * @param string|null $queue
  12089. * @return mixed
  12090. * @static
  12091. */
  12092. public static function bulk($jobs, $data = '', $queue = null)
  12093. {
  12094. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12095. return $instance->bulk($jobs, $data, $queue);
  12096. }
  12097. /**
  12098. * Get the jobs that have been pushed.
  12099. *
  12100. * @return array
  12101. * @static
  12102. */
  12103. public static function pushedJobs()
  12104. {
  12105. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12106. return $instance->pushedJobs();
  12107. }
  12108. /**
  12109. * Get the payloads that were pushed raw.
  12110. *
  12111. * @return list<RawPushType>
  12112. * @static
  12113. */
  12114. public static function rawPushes()
  12115. {
  12116. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12117. return $instance->rawPushes();
  12118. }
  12119. /**
  12120. * Specify if jobs should be serialized and restored when being "pushed" to the queue.
  12121. *
  12122. * @param bool $serializeAndRestore
  12123. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  12124. * @static
  12125. */
  12126. public static function serializeAndRestore($serializeAndRestore = true)
  12127. {
  12128. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12129. return $instance->serializeAndRestore($serializeAndRestore);
  12130. }
  12131. /**
  12132. * Get the connection name for the queue.
  12133. *
  12134. * @return string
  12135. * @static
  12136. */
  12137. public static function getConnectionName()
  12138. {
  12139. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12140. return $instance->getConnectionName();
  12141. }
  12142. /**
  12143. * Set the connection name for the queue.
  12144. *
  12145. * @param string $name
  12146. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  12147. * @static
  12148. */
  12149. public static function setConnectionName($name)
  12150. {
  12151. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12152. return $instance->setConnectionName($name);
  12153. }
  12154. /**
  12155. * Migrate the delayed jobs that are ready to the regular queue.
  12156. *
  12157. * @param string $from
  12158. * @param string $to
  12159. * @return array
  12160. * @static
  12161. */
  12162. public static function migrateExpiredJobs($from, $to)
  12163. {
  12164. /** @var \Illuminate\Queue\RedisQueue $instance */
  12165. return $instance->migrateExpiredJobs($from, $to);
  12166. }
  12167. /**
  12168. * Delete a reserved job from the queue.
  12169. *
  12170. * @param string $queue
  12171. * @param \Illuminate\Queue\Jobs\RedisJob $job
  12172. * @return void
  12173. * @static
  12174. */
  12175. public static function deleteReserved($queue, $job)
  12176. {
  12177. /** @var \Illuminate\Queue\RedisQueue $instance */
  12178. $instance->deleteReserved($queue, $job);
  12179. }
  12180. /**
  12181. * Delete a reserved job from the reserved queue and release it.
  12182. *
  12183. * @param string $queue
  12184. * @param \Illuminate\Queue\Jobs\RedisJob $job
  12185. * @param int $delay
  12186. * @return void
  12187. * @static
  12188. */
  12189. public static function deleteAndRelease($queue, $job, $delay)
  12190. {
  12191. /** @var \Illuminate\Queue\RedisQueue $instance */
  12192. $instance->deleteAndRelease($queue, $job, $delay);
  12193. }
  12194. /**
  12195. * Delete all of the jobs from the queue.
  12196. *
  12197. * @param string $queue
  12198. * @return int
  12199. * @static
  12200. */
  12201. public static function clear($queue)
  12202. {
  12203. /** @var \Illuminate\Queue\RedisQueue $instance */
  12204. return $instance->clear($queue);
  12205. }
  12206. /**
  12207. * Get the queue or return the default.
  12208. *
  12209. * @param string|null $queue
  12210. * @return string
  12211. * @static
  12212. */
  12213. public static function getQueue($queue)
  12214. {
  12215. /** @var \Illuminate\Queue\RedisQueue $instance */
  12216. return $instance->getQueue($queue);
  12217. }
  12218. /**
  12219. * Get the connection for the queue.
  12220. *
  12221. * @return \Illuminate\Redis\Connections\Connection
  12222. * @static
  12223. */
  12224. public static function getConnection()
  12225. {
  12226. /** @var \Illuminate\Queue\RedisQueue $instance */
  12227. return $instance->getConnection();
  12228. }
  12229. /**
  12230. * Get the underlying Redis instance.
  12231. *
  12232. * @return \Illuminate\Contracts\Redis\Factory
  12233. * @static
  12234. */
  12235. public static function getRedis()
  12236. {
  12237. /** @var \Illuminate\Queue\RedisQueue $instance */
  12238. return $instance->getRedis();
  12239. }
  12240. /**
  12241. * Get the maximum number of attempts for an object-based queue handler.
  12242. *
  12243. * @param mixed $job
  12244. * @return mixed
  12245. * @static
  12246. */
  12247. public static function getJobTries($job)
  12248. {
  12249. //Method inherited from \Illuminate\Queue\Queue
  12250. /** @var \Illuminate\Queue\RedisQueue $instance */
  12251. return $instance->getJobTries($job);
  12252. }
  12253. /**
  12254. * Get the backoff for an object-based queue handler.
  12255. *
  12256. * @param mixed $job
  12257. * @return mixed
  12258. * @static
  12259. */
  12260. public static function getJobBackoff($job)
  12261. {
  12262. //Method inherited from \Illuminate\Queue\Queue
  12263. /** @var \Illuminate\Queue\RedisQueue $instance */
  12264. return $instance->getJobBackoff($job);
  12265. }
  12266. /**
  12267. * Get the expiration timestamp for an object-based queue handler.
  12268. *
  12269. * @param mixed $job
  12270. * @return mixed
  12271. * @static
  12272. */
  12273. public static function getJobExpiration($job)
  12274. {
  12275. //Method inherited from \Illuminate\Queue\Queue
  12276. /** @var \Illuminate\Queue\RedisQueue $instance */
  12277. return $instance->getJobExpiration($job);
  12278. }
  12279. /**
  12280. * Register a callback to be executed when creating job payloads.
  12281. *
  12282. * @param callable|null $callback
  12283. * @return void
  12284. * @static
  12285. */
  12286. public static function createPayloadUsing($callback)
  12287. {
  12288. //Method inherited from \Illuminate\Queue\Queue
  12289. \Illuminate\Queue\RedisQueue::createPayloadUsing($callback);
  12290. }
  12291. /**
  12292. * Get the container instance being used by the connection.
  12293. *
  12294. * @return \Illuminate\Container\Container
  12295. * @static
  12296. */
  12297. public static function getContainer()
  12298. {
  12299. //Method inherited from \Illuminate\Queue\Queue
  12300. /** @var \Illuminate\Queue\RedisQueue $instance */
  12301. return $instance->getContainer();
  12302. }
  12303. /**
  12304. * Set the IoC container instance.
  12305. *
  12306. * @param \Illuminate\Container\Container $container
  12307. * @return void
  12308. * @static
  12309. */
  12310. public static function setContainer($container)
  12311. {
  12312. //Method inherited from \Illuminate\Queue\Queue
  12313. /** @var \Illuminate\Queue\RedisQueue $instance */
  12314. $instance->setContainer($container);
  12315. }
  12316. }
  12317. /**
  12318. * @see \Illuminate\Cache\RateLimiter
  12319. */
  12320. class RateLimiter {
  12321. /**
  12322. * Register a named limiter configuration.
  12323. *
  12324. * @param \BackedEnum|\UnitEnum|string $name
  12325. * @param \Closure $callback
  12326. * @return \Illuminate\Cache\RateLimiter
  12327. * @static
  12328. */
  12329. public static function for($name, $callback)
  12330. {
  12331. /** @var \Illuminate\Cache\RateLimiter $instance */
  12332. return $instance->for($name, $callback);
  12333. }
  12334. /**
  12335. * Get the given named rate limiter.
  12336. *
  12337. * @param \BackedEnum|\UnitEnum|string $name
  12338. * @return \Closure|null
  12339. * @static
  12340. */
  12341. public static function limiter($name)
  12342. {
  12343. /** @var \Illuminate\Cache\RateLimiter $instance */
  12344. return $instance->limiter($name);
  12345. }
  12346. /**
  12347. * Attempts to execute a callback if it's not limited.
  12348. *
  12349. * @param string $key
  12350. * @param int $maxAttempts
  12351. * @param \Closure $callback
  12352. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12353. * @return mixed
  12354. * @static
  12355. */
  12356. public static function attempt($key, $maxAttempts, $callback, $decaySeconds = 60)
  12357. {
  12358. /** @var \Illuminate\Cache\RateLimiter $instance */
  12359. return $instance->attempt($key, $maxAttempts, $callback, $decaySeconds);
  12360. }
  12361. /**
  12362. * Determine if the given key has been "accessed" too many times.
  12363. *
  12364. * @param string $key
  12365. * @param int $maxAttempts
  12366. * @return bool
  12367. * @static
  12368. */
  12369. public static function tooManyAttempts($key, $maxAttempts)
  12370. {
  12371. /** @var \Illuminate\Cache\RateLimiter $instance */
  12372. return $instance->tooManyAttempts($key, $maxAttempts);
  12373. }
  12374. /**
  12375. * Increment (by 1) the counter for a given key for a given decay time.
  12376. *
  12377. * @param string $key
  12378. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12379. * @return int
  12380. * @static
  12381. */
  12382. public static function hit($key, $decaySeconds = 60)
  12383. {
  12384. /** @var \Illuminate\Cache\RateLimiter $instance */
  12385. return $instance->hit($key, $decaySeconds);
  12386. }
  12387. /**
  12388. * Increment the counter for a given key for a given decay time by a given amount.
  12389. *
  12390. * @param string $key
  12391. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12392. * @param int $amount
  12393. * @return int
  12394. * @static
  12395. */
  12396. public static function increment($key, $decaySeconds = 60, $amount = 1)
  12397. {
  12398. /** @var \Illuminate\Cache\RateLimiter $instance */
  12399. return $instance->increment($key, $decaySeconds, $amount);
  12400. }
  12401. /**
  12402. * Decrement the counter for a given key for a given decay time by a given amount.
  12403. *
  12404. * @param string $key
  12405. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12406. * @param int $amount
  12407. * @return int
  12408. * @static
  12409. */
  12410. public static function decrement($key, $decaySeconds = 60, $amount = 1)
  12411. {
  12412. /** @var \Illuminate\Cache\RateLimiter $instance */
  12413. return $instance->decrement($key, $decaySeconds, $amount);
  12414. }
  12415. /**
  12416. * Get the number of attempts for the given key.
  12417. *
  12418. * @param string $key
  12419. * @return mixed
  12420. * @static
  12421. */
  12422. public static function attempts($key)
  12423. {
  12424. /** @var \Illuminate\Cache\RateLimiter $instance */
  12425. return $instance->attempts($key);
  12426. }
  12427. /**
  12428. * Reset the number of attempts for the given key.
  12429. *
  12430. * @param string $key
  12431. * @return mixed
  12432. * @static
  12433. */
  12434. public static function resetAttempts($key)
  12435. {
  12436. /** @var \Illuminate\Cache\RateLimiter $instance */
  12437. return $instance->resetAttempts($key);
  12438. }
  12439. /**
  12440. * Get the number of retries left for the given key.
  12441. *
  12442. * @param string $key
  12443. * @param int $maxAttempts
  12444. * @return int
  12445. * @static
  12446. */
  12447. public static function remaining($key, $maxAttempts)
  12448. {
  12449. /** @var \Illuminate\Cache\RateLimiter $instance */
  12450. return $instance->remaining($key, $maxAttempts);
  12451. }
  12452. /**
  12453. * Get the number of retries left for the given key.
  12454. *
  12455. * @param string $key
  12456. * @param int $maxAttempts
  12457. * @return int
  12458. * @static
  12459. */
  12460. public static function retriesLeft($key, $maxAttempts)
  12461. {
  12462. /** @var \Illuminate\Cache\RateLimiter $instance */
  12463. return $instance->retriesLeft($key, $maxAttempts);
  12464. }
  12465. /**
  12466. * Clear the hits and lockout timer for the given key.
  12467. *
  12468. * @param string $key
  12469. * @return void
  12470. * @static
  12471. */
  12472. public static function clear($key)
  12473. {
  12474. /** @var \Illuminate\Cache\RateLimiter $instance */
  12475. $instance->clear($key);
  12476. }
  12477. /**
  12478. * Get the number of seconds until the "key" is accessible again.
  12479. *
  12480. * @param string $key
  12481. * @return int
  12482. * @static
  12483. */
  12484. public static function availableIn($key)
  12485. {
  12486. /** @var \Illuminate\Cache\RateLimiter $instance */
  12487. return $instance->availableIn($key);
  12488. }
  12489. /**
  12490. * Clean the rate limiter key from unicode characters.
  12491. *
  12492. * @param string $key
  12493. * @return string
  12494. * @static
  12495. */
  12496. public static function cleanRateLimiterKey($key)
  12497. {
  12498. /** @var \Illuminate\Cache\RateLimiter $instance */
  12499. return $instance->cleanRateLimiterKey($key);
  12500. }
  12501. }
  12502. /**
  12503. * @see \Illuminate\Routing\Redirector
  12504. */
  12505. class Redirect {
  12506. /**
  12507. * Create a new redirect response to the previous location.
  12508. *
  12509. * @param int $status
  12510. * @param array $headers
  12511. * @param mixed $fallback
  12512. * @return \Illuminate\Http\RedirectResponse
  12513. * @static
  12514. */
  12515. public static function back($status = 302, $headers = [], $fallback = false)
  12516. {
  12517. /** @var \Illuminate\Routing\Redirector $instance */
  12518. return $instance->back($status, $headers, $fallback);
  12519. }
  12520. /**
  12521. * Create a new redirect response to the current URI.
  12522. *
  12523. * @param int $status
  12524. * @param array $headers
  12525. * @return \Illuminate\Http\RedirectResponse
  12526. * @static
  12527. */
  12528. public static function refresh($status = 302, $headers = [])
  12529. {
  12530. /** @var \Illuminate\Routing\Redirector $instance */
  12531. return $instance->refresh($status, $headers);
  12532. }
  12533. /**
  12534. * Create a new redirect response, while putting the current URL in the session.
  12535. *
  12536. * @param string $path
  12537. * @param int $status
  12538. * @param array $headers
  12539. * @param bool|null $secure
  12540. * @return \Illuminate\Http\RedirectResponse
  12541. * @static
  12542. */
  12543. public static function guest($path, $status = 302, $headers = [], $secure = null)
  12544. {
  12545. /** @var \Illuminate\Routing\Redirector $instance */
  12546. return $instance->guest($path, $status, $headers, $secure);
  12547. }
  12548. /**
  12549. * Create a new redirect response to the previously intended location.
  12550. *
  12551. * @param mixed $default
  12552. * @param int $status
  12553. * @param array $headers
  12554. * @param bool|null $secure
  12555. * @return \Illuminate\Http\RedirectResponse
  12556. * @static
  12557. */
  12558. public static function intended($default = '/', $status = 302, $headers = [], $secure = null)
  12559. {
  12560. /** @var \Illuminate\Routing\Redirector $instance */
  12561. return $instance->intended($default, $status, $headers, $secure);
  12562. }
  12563. /**
  12564. * Create a new redirect response to the given path.
  12565. *
  12566. * @param string $path
  12567. * @param int $status
  12568. * @param array $headers
  12569. * @param bool|null $secure
  12570. * @return \Illuminate\Http\RedirectResponse
  12571. * @static
  12572. */
  12573. public static function to($path, $status = 302, $headers = [], $secure = null)
  12574. {
  12575. /** @var \Illuminate\Routing\Redirector $instance */
  12576. return $instance->to($path, $status, $headers, $secure);
  12577. }
  12578. /**
  12579. * Create a new redirect response to an external URL (no validation).
  12580. *
  12581. * @param string $path
  12582. * @param int $status
  12583. * @param array $headers
  12584. * @return \Illuminate\Http\RedirectResponse
  12585. * @static
  12586. */
  12587. public static function away($path, $status = 302, $headers = [])
  12588. {
  12589. /** @var \Illuminate\Routing\Redirector $instance */
  12590. return $instance->away($path, $status, $headers);
  12591. }
  12592. /**
  12593. * Create a new redirect response to the given HTTPS path.
  12594. *
  12595. * @param string $path
  12596. * @param int $status
  12597. * @param array $headers
  12598. * @return \Illuminate\Http\RedirectResponse
  12599. * @static
  12600. */
  12601. public static function secure($path, $status = 302, $headers = [])
  12602. {
  12603. /** @var \Illuminate\Routing\Redirector $instance */
  12604. return $instance->secure($path, $status, $headers);
  12605. }
  12606. /**
  12607. * Create a new redirect response to a named route.
  12608. *
  12609. * @param \BackedEnum|string $route
  12610. * @param mixed $parameters
  12611. * @param int $status
  12612. * @param array $headers
  12613. * @return \Illuminate\Http\RedirectResponse
  12614. * @static
  12615. */
  12616. public static function route($route, $parameters = [], $status = 302, $headers = [])
  12617. {
  12618. /** @var \Illuminate\Routing\Redirector $instance */
  12619. return $instance->route($route, $parameters, $status, $headers);
  12620. }
  12621. /**
  12622. * Create a new redirect response to a signed named route.
  12623. *
  12624. * @param \BackedEnum|string $route
  12625. * @param mixed $parameters
  12626. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  12627. * @param int $status
  12628. * @param array $headers
  12629. * @return \Illuminate\Http\RedirectResponse
  12630. * @static
  12631. */
  12632. public static function signedRoute($route, $parameters = [], $expiration = null, $status = 302, $headers = [])
  12633. {
  12634. /** @var \Illuminate\Routing\Redirector $instance */
  12635. return $instance->signedRoute($route, $parameters, $expiration, $status, $headers);
  12636. }
  12637. /**
  12638. * Create a new redirect response to a signed named route.
  12639. *
  12640. * @param \BackedEnum|string $route
  12641. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  12642. * @param mixed $parameters
  12643. * @param int $status
  12644. * @param array $headers
  12645. * @return \Illuminate\Http\RedirectResponse
  12646. * @static
  12647. */
  12648. public static function temporarySignedRoute($route, $expiration, $parameters = [], $status = 302, $headers = [])
  12649. {
  12650. /** @var \Illuminate\Routing\Redirector $instance */
  12651. return $instance->temporarySignedRoute($route, $expiration, $parameters, $status, $headers);
  12652. }
  12653. /**
  12654. * Create a new redirect response to a controller action.
  12655. *
  12656. * @param string|array $action
  12657. * @param mixed $parameters
  12658. * @param int $status
  12659. * @param array $headers
  12660. * @return \Illuminate\Http\RedirectResponse
  12661. * @static
  12662. */
  12663. public static function action($action, $parameters = [], $status = 302, $headers = [])
  12664. {
  12665. /** @var \Illuminate\Routing\Redirector $instance */
  12666. return $instance->action($action, $parameters, $status, $headers);
  12667. }
  12668. /**
  12669. * Get the URL generator instance.
  12670. *
  12671. * @return \Illuminate\Routing\UrlGenerator
  12672. * @static
  12673. */
  12674. public static function getUrlGenerator()
  12675. {
  12676. /** @var \Illuminate\Routing\Redirector $instance */
  12677. return $instance->getUrlGenerator();
  12678. }
  12679. /**
  12680. * Set the active session store.
  12681. *
  12682. * @param \Illuminate\Session\Store $session
  12683. * @return void
  12684. * @static
  12685. */
  12686. public static function setSession($session)
  12687. {
  12688. /** @var \Illuminate\Routing\Redirector $instance */
  12689. $instance->setSession($session);
  12690. }
  12691. /**
  12692. * Get the "intended" URL from the session.
  12693. *
  12694. * @return string|null
  12695. * @static
  12696. */
  12697. public static function getIntendedUrl()
  12698. {
  12699. /** @var \Illuminate\Routing\Redirector $instance */
  12700. return $instance->getIntendedUrl();
  12701. }
  12702. /**
  12703. * Set the "intended" URL in the session.
  12704. *
  12705. * @param string $url
  12706. * @return \Illuminate\Routing\Redirector
  12707. * @static
  12708. */
  12709. public static function setIntendedUrl($url)
  12710. {
  12711. /** @var \Illuminate\Routing\Redirector $instance */
  12712. return $instance->setIntendedUrl($url);
  12713. }
  12714. /**
  12715. * Register a custom macro.
  12716. *
  12717. * @param string $name
  12718. * @param object|callable $macro
  12719. * @param-closure-this static $macro
  12720. * @return void
  12721. * @static
  12722. */
  12723. public static function macro($name, $macro)
  12724. {
  12725. \Illuminate\Routing\Redirector::macro($name, $macro);
  12726. }
  12727. /**
  12728. * Mix another object into the class.
  12729. *
  12730. * @param object $mixin
  12731. * @param bool $replace
  12732. * @return void
  12733. * @throws \ReflectionException
  12734. * @static
  12735. */
  12736. public static function mixin($mixin, $replace = true)
  12737. {
  12738. \Illuminate\Routing\Redirector::mixin($mixin, $replace);
  12739. }
  12740. /**
  12741. * Checks if macro is registered.
  12742. *
  12743. * @param string $name
  12744. * @return bool
  12745. * @static
  12746. */
  12747. public static function hasMacro($name)
  12748. {
  12749. return \Illuminate\Routing\Redirector::hasMacro($name);
  12750. }
  12751. /**
  12752. * Flush the existing macros.
  12753. *
  12754. * @return void
  12755. * @static
  12756. */
  12757. public static function flushMacros()
  12758. {
  12759. \Illuminate\Routing\Redirector::flushMacros();
  12760. }
  12761. }
  12762. /**
  12763. * @see \Illuminate\Http\Request
  12764. */
  12765. class Request {
  12766. /**
  12767. * Create a new Illuminate HTTP request from server variables.
  12768. *
  12769. * @return static
  12770. * @static
  12771. */
  12772. public static function capture()
  12773. {
  12774. return \Illuminate\Http\Request::capture();
  12775. }
  12776. /**
  12777. * Return the Request instance.
  12778. *
  12779. * @return \Illuminate\Http\Request
  12780. * @static
  12781. */
  12782. public static function instance()
  12783. {
  12784. /** @var \Illuminate\Http\Request $instance */
  12785. return $instance->instance();
  12786. }
  12787. /**
  12788. * Get the request method.
  12789. *
  12790. * @return string
  12791. * @static
  12792. */
  12793. public static function method()
  12794. {
  12795. /** @var \Illuminate\Http\Request $instance */
  12796. return $instance->method();
  12797. }
  12798. /**
  12799. * Get a URI instance for the request.
  12800. *
  12801. * @return \Illuminate\Support\Uri
  12802. * @static
  12803. */
  12804. public static function uri()
  12805. {
  12806. /** @var \Illuminate\Http\Request $instance */
  12807. return $instance->uri();
  12808. }
  12809. /**
  12810. * Get the root URL for the application.
  12811. *
  12812. * @return string
  12813. * @static
  12814. */
  12815. public static function root()
  12816. {
  12817. /** @var \Illuminate\Http\Request $instance */
  12818. return $instance->root();
  12819. }
  12820. /**
  12821. * Get the URL (no query string) for the request.
  12822. *
  12823. * @return string
  12824. * @static
  12825. */
  12826. public static function url()
  12827. {
  12828. /** @var \Illuminate\Http\Request $instance */
  12829. return $instance->url();
  12830. }
  12831. /**
  12832. * Get the full URL for the request.
  12833. *
  12834. * @return string
  12835. * @static
  12836. */
  12837. public static function fullUrl()
  12838. {
  12839. /** @var \Illuminate\Http\Request $instance */
  12840. return $instance->fullUrl();
  12841. }
  12842. /**
  12843. * Get the full URL for the request with the added query string parameters.
  12844. *
  12845. * @param array $query
  12846. * @return string
  12847. * @static
  12848. */
  12849. public static function fullUrlWithQuery($query)
  12850. {
  12851. /** @var \Illuminate\Http\Request $instance */
  12852. return $instance->fullUrlWithQuery($query);
  12853. }
  12854. /**
  12855. * Get the full URL for the request without the given query string parameters.
  12856. *
  12857. * @param array|string $keys
  12858. * @return string
  12859. * @static
  12860. */
  12861. public static function fullUrlWithoutQuery($keys)
  12862. {
  12863. /** @var \Illuminate\Http\Request $instance */
  12864. return $instance->fullUrlWithoutQuery($keys);
  12865. }
  12866. /**
  12867. * Get the current path info for the request.
  12868. *
  12869. * @return string
  12870. * @static
  12871. */
  12872. public static function path()
  12873. {
  12874. /** @var \Illuminate\Http\Request $instance */
  12875. return $instance->path();
  12876. }
  12877. /**
  12878. * Get the current decoded path info for the request.
  12879. *
  12880. * @return string
  12881. * @static
  12882. */
  12883. public static function decodedPath()
  12884. {
  12885. /** @var \Illuminate\Http\Request $instance */
  12886. return $instance->decodedPath();
  12887. }
  12888. /**
  12889. * Get a segment from the URI (1 based index).
  12890. *
  12891. * @param int $index
  12892. * @param string|null $default
  12893. * @return string|null
  12894. * @static
  12895. */
  12896. public static function segment($index, $default = null)
  12897. {
  12898. /** @var \Illuminate\Http\Request $instance */
  12899. return $instance->segment($index, $default);
  12900. }
  12901. /**
  12902. * Get all of the segments for the request path.
  12903. *
  12904. * @return array
  12905. * @static
  12906. */
  12907. public static function segments()
  12908. {
  12909. /** @var \Illuminate\Http\Request $instance */
  12910. return $instance->segments();
  12911. }
  12912. /**
  12913. * Determine if the current request URI matches a pattern.
  12914. *
  12915. * @param mixed $patterns
  12916. * @return bool
  12917. * @static
  12918. */
  12919. public static function is(...$patterns)
  12920. {
  12921. /** @var \Illuminate\Http\Request $instance */
  12922. return $instance->is(...$patterns);
  12923. }
  12924. /**
  12925. * Determine if the route name matches a given pattern.
  12926. *
  12927. * @param mixed $patterns
  12928. * @return bool
  12929. * @static
  12930. */
  12931. public static function routeIs(...$patterns)
  12932. {
  12933. /** @var \Illuminate\Http\Request $instance */
  12934. return $instance->routeIs(...$patterns);
  12935. }
  12936. /**
  12937. * Determine if the current request URL and query string match a pattern.
  12938. *
  12939. * @param mixed $patterns
  12940. * @return bool
  12941. * @static
  12942. */
  12943. public static function fullUrlIs(...$patterns)
  12944. {
  12945. /** @var \Illuminate\Http\Request $instance */
  12946. return $instance->fullUrlIs(...$patterns);
  12947. }
  12948. /**
  12949. * Get the host name.
  12950. *
  12951. * @return string
  12952. * @static
  12953. */
  12954. public static function host()
  12955. {
  12956. /** @var \Illuminate\Http\Request $instance */
  12957. return $instance->host();
  12958. }
  12959. /**
  12960. * Get the HTTP host being requested.
  12961. *
  12962. * @return string
  12963. * @static
  12964. */
  12965. public static function httpHost()
  12966. {
  12967. /** @var \Illuminate\Http\Request $instance */
  12968. return $instance->httpHost();
  12969. }
  12970. /**
  12971. * Get the scheme and HTTP host.
  12972. *
  12973. * @return string
  12974. * @static
  12975. */
  12976. public static function schemeAndHttpHost()
  12977. {
  12978. /** @var \Illuminate\Http\Request $instance */
  12979. return $instance->schemeAndHttpHost();
  12980. }
  12981. /**
  12982. * Determine if the request is the result of an AJAX call.
  12983. *
  12984. * @return bool
  12985. * @static
  12986. */
  12987. public static function ajax()
  12988. {
  12989. /** @var \Illuminate\Http\Request $instance */
  12990. return $instance->ajax();
  12991. }
  12992. /**
  12993. * Determine if the request is the result of a PJAX call.
  12994. *
  12995. * @return bool
  12996. * @static
  12997. */
  12998. public static function pjax()
  12999. {
  13000. /** @var \Illuminate\Http\Request $instance */
  13001. return $instance->pjax();
  13002. }
  13003. /**
  13004. * Determine if the request is the result of a prefetch call.
  13005. *
  13006. * @return bool
  13007. * @static
  13008. */
  13009. public static function prefetch()
  13010. {
  13011. /** @var \Illuminate\Http\Request $instance */
  13012. return $instance->prefetch();
  13013. }
  13014. /**
  13015. * Determine if the request is over HTTPS.
  13016. *
  13017. * @return bool
  13018. * @static
  13019. */
  13020. public static function secure()
  13021. {
  13022. /** @var \Illuminate\Http\Request $instance */
  13023. return $instance->secure();
  13024. }
  13025. /**
  13026. * Get the client IP address.
  13027. *
  13028. * @return string|null
  13029. * @static
  13030. */
  13031. public static function ip()
  13032. {
  13033. /** @var \Illuminate\Http\Request $instance */
  13034. return $instance->ip();
  13035. }
  13036. /**
  13037. * Get the client IP addresses.
  13038. *
  13039. * @return array
  13040. * @static
  13041. */
  13042. public static function ips()
  13043. {
  13044. /** @var \Illuminate\Http\Request $instance */
  13045. return $instance->ips();
  13046. }
  13047. /**
  13048. * Get the client user agent.
  13049. *
  13050. * @return string|null
  13051. * @static
  13052. */
  13053. public static function userAgent()
  13054. {
  13055. /** @var \Illuminate\Http\Request $instance */
  13056. return $instance->userAgent();
  13057. }
  13058. /**
  13059. * Merge new input into the current request's input array.
  13060. *
  13061. * @param array $input
  13062. * @return \Illuminate\Http\Request
  13063. * @static
  13064. */
  13065. public static function merge($input)
  13066. {
  13067. /** @var \Illuminate\Http\Request $instance */
  13068. return $instance->merge($input);
  13069. }
  13070. /**
  13071. * Merge new input into the request's input, but only when that key is missing from the request.
  13072. *
  13073. * @param array $input
  13074. * @return \Illuminate\Http\Request
  13075. * @static
  13076. */
  13077. public static function mergeIfMissing($input)
  13078. {
  13079. /** @var \Illuminate\Http\Request $instance */
  13080. return $instance->mergeIfMissing($input);
  13081. }
  13082. /**
  13083. * Replace the input values for the current request.
  13084. *
  13085. * @param array $input
  13086. * @return \Illuminate\Http\Request
  13087. * @static
  13088. */
  13089. public static function replace($input)
  13090. {
  13091. /** @var \Illuminate\Http\Request $instance */
  13092. return $instance->replace($input);
  13093. }
  13094. /**
  13095. * This method belongs to Symfony HttpFoundation and is not usually needed when using Laravel.
  13096. *
  13097. * Instead, you may use the "input" method.
  13098. *
  13099. * @param string $key
  13100. * @param mixed $default
  13101. * @return mixed
  13102. * @static
  13103. */
  13104. public static function get($key, $default = null)
  13105. {
  13106. /** @var \Illuminate\Http\Request $instance */
  13107. return $instance->get($key, $default);
  13108. }
  13109. /**
  13110. * Get the JSON payload for the request.
  13111. *
  13112. * @param string|null $key
  13113. * @param mixed $default
  13114. * @return ($key is null ? \Symfony\Component\HttpFoundation\InputBag : mixed)
  13115. * @static
  13116. */
  13117. public static function json($key = null, $default = null)
  13118. {
  13119. /** @var \Illuminate\Http\Request $instance */
  13120. return $instance->json($key, $default);
  13121. }
  13122. /**
  13123. * Create a new request instance from the given Laravel request.
  13124. *
  13125. * @param \Illuminate\Http\Request $from
  13126. * @param \Illuminate\Http\Request|null $to
  13127. * @return static
  13128. * @static
  13129. */
  13130. public static function createFrom($from, $to = null)
  13131. {
  13132. return \Illuminate\Http\Request::createFrom($from, $to);
  13133. }
  13134. /**
  13135. * Create an Illuminate request from a Symfony instance.
  13136. *
  13137. * @param \Symfony\Component\HttpFoundation\Request $request
  13138. * @return static
  13139. * @static
  13140. */
  13141. public static function createFromBase($request)
  13142. {
  13143. return \Illuminate\Http\Request::createFromBase($request);
  13144. }
  13145. /**
  13146. * Clones a request and overrides some of its parameters.
  13147. *
  13148. * @return static
  13149. * @param array|null $query The GET parameters
  13150. * @param array|null $request The POST parameters
  13151. * @param array|null $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  13152. * @param array|null $cookies The COOKIE parameters
  13153. * @param array|null $files The FILES parameters
  13154. * @param array|null $server The SERVER parameters
  13155. * @static
  13156. */
  13157. public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null)
  13158. {
  13159. /** @var \Illuminate\Http\Request $instance */
  13160. return $instance->duplicate($query, $request, $attributes, $cookies, $files, $server);
  13161. }
  13162. /**
  13163. * Whether the request contains a Session object.
  13164. *
  13165. * This method does not give any information about the state of the session object,
  13166. * like whether the session is started or not. It is just a way to check if this Request
  13167. * is associated with a Session instance.
  13168. *
  13169. * @param bool $skipIfUninitialized When true, ignores factories injected by `setSessionFactory`
  13170. * @static
  13171. */
  13172. public static function hasSession($skipIfUninitialized = false)
  13173. {
  13174. /** @var \Illuminate\Http\Request $instance */
  13175. return $instance->hasSession($skipIfUninitialized);
  13176. }
  13177. /**
  13178. * Gets the Session.
  13179. *
  13180. * @throws SessionNotFoundException When session is not set properly
  13181. * @static
  13182. */
  13183. public static function getSession()
  13184. {
  13185. /** @var \Illuminate\Http\Request $instance */
  13186. return $instance->getSession();
  13187. }
  13188. /**
  13189. * Get the session associated with the request.
  13190. *
  13191. * @return \Illuminate\Contracts\Session\Session
  13192. * @throws \RuntimeException
  13193. * @static
  13194. */
  13195. public static function session()
  13196. {
  13197. /** @var \Illuminate\Http\Request $instance */
  13198. return $instance->session();
  13199. }
  13200. /**
  13201. * Set the session instance on the request.
  13202. *
  13203. * @param \Illuminate\Contracts\Session\Session $session
  13204. * @return void
  13205. * @static
  13206. */
  13207. public static function setLaravelSession($session)
  13208. {
  13209. /** @var \Illuminate\Http\Request $instance */
  13210. $instance->setLaravelSession($session);
  13211. }
  13212. /**
  13213. * Set the locale for the request instance.
  13214. *
  13215. * @param string $locale
  13216. * @return void
  13217. * @static
  13218. */
  13219. public static function setRequestLocale($locale)
  13220. {
  13221. /** @var \Illuminate\Http\Request $instance */
  13222. $instance->setRequestLocale($locale);
  13223. }
  13224. /**
  13225. * Set the default locale for the request instance.
  13226. *
  13227. * @param string $locale
  13228. * @return void
  13229. * @static
  13230. */
  13231. public static function setDefaultRequestLocale($locale)
  13232. {
  13233. /** @var \Illuminate\Http\Request $instance */
  13234. $instance->setDefaultRequestLocale($locale);
  13235. }
  13236. /**
  13237. * Get the user making the request.
  13238. *
  13239. * @param string|null $guard
  13240. * @return mixed
  13241. * @static
  13242. */
  13243. public static function user($guard = null)
  13244. {
  13245. /** @var \Illuminate\Http\Request $instance */
  13246. return $instance->user($guard);
  13247. }
  13248. /**
  13249. * Get the route handling the request.
  13250. *
  13251. * @param string|null $param
  13252. * @param mixed $default
  13253. * @return ($param is null ? \Illuminate\Routing\Route : object|string|null)
  13254. * @static
  13255. */
  13256. public static function route($param = null, $default = null)
  13257. {
  13258. /** @var \Illuminate\Http\Request $instance */
  13259. return $instance->route($param, $default);
  13260. }
  13261. /**
  13262. * Get a unique fingerprint for the request / route / IP address.
  13263. *
  13264. * @return string
  13265. * @throws \RuntimeException
  13266. * @static
  13267. */
  13268. public static function fingerprint()
  13269. {
  13270. /** @var \Illuminate\Http\Request $instance */
  13271. return $instance->fingerprint();
  13272. }
  13273. /**
  13274. * Set the JSON payload for the request.
  13275. *
  13276. * @param \Symfony\Component\HttpFoundation\InputBag $json
  13277. * @return \Illuminate\Http\Request
  13278. * @static
  13279. */
  13280. public static function setJson($json)
  13281. {
  13282. /** @var \Illuminate\Http\Request $instance */
  13283. return $instance->setJson($json);
  13284. }
  13285. /**
  13286. * Get the user resolver callback.
  13287. *
  13288. * @return \Closure
  13289. * @static
  13290. */
  13291. public static function getUserResolver()
  13292. {
  13293. /** @var \Illuminate\Http\Request $instance */
  13294. return $instance->getUserResolver();
  13295. }
  13296. /**
  13297. * Set the user resolver callback.
  13298. *
  13299. * @param \Closure $callback
  13300. * @return \Illuminate\Http\Request
  13301. * @static
  13302. */
  13303. public static function setUserResolver($callback)
  13304. {
  13305. /** @var \Illuminate\Http\Request $instance */
  13306. return $instance->setUserResolver($callback);
  13307. }
  13308. /**
  13309. * Get the route resolver callback.
  13310. *
  13311. * @return \Closure
  13312. * @static
  13313. */
  13314. public static function getRouteResolver()
  13315. {
  13316. /** @var \Illuminate\Http\Request $instance */
  13317. return $instance->getRouteResolver();
  13318. }
  13319. /**
  13320. * Set the route resolver callback.
  13321. *
  13322. * @param \Closure $callback
  13323. * @return \Illuminate\Http\Request
  13324. * @static
  13325. */
  13326. public static function setRouteResolver($callback)
  13327. {
  13328. /** @var \Illuminate\Http\Request $instance */
  13329. return $instance->setRouteResolver($callback);
  13330. }
  13331. /**
  13332. * Get all of the input and files for the request.
  13333. *
  13334. * @return array
  13335. * @static
  13336. */
  13337. public static function toArray()
  13338. {
  13339. /** @var \Illuminate\Http\Request $instance */
  13340. return $instance->toArray();
  13341. }
  13342. /**
  13343. * Determine if the given offset exists.
  13344. *
  13345. * @param string $offset
  13346. * @return bool
  13347. * @static
  13348. */
  13349. public static function offsetExists($offset)
  13350. {
  13351. /** @var \Illuminate\Http\Request $instance */
  13352. return $instance->offsetExists($offset);
  13353. }
  13354. /**
  13355. * Get the value at the given offset.
  13356. *
  13357. * @param string $offset
  13358. * @return mixed
  13359. * @static
  13360. */
  13361. public static function offsetGet($offset)
  13362. {
  13363. /** @var \Illuminate\Http\Request $instance */
  13364. return $instance->offsetGet($offset);
  13365. }
  13366. /**
  13367. * Set the value at the given offset.
  13368. *
  13369. * @param string $offset
  13370. * @param mixed $value
  13371. * @return void
  13372. * @static
  13373. */
  13374. public static function offsetSet($offset, $value)
  13375. {
  13376. /** @var \Illuminate\Http\Request $instance */
  13377. $instance->offsetSet($offset, $value);
  13378. }
  13379. /**
  13380. * Remove the value at the given offset.
  13381. *
  13382. * @param string $offset
  13383. * @return void
  13384. * @static
  13385. */
  13386. public static function offsetUnset($offset)
  13387. {
  13388. /** @var \Illuminate\Http\Request $instance */
  13389. $instance->offsetUnset($offset);
  13390. }
  13391. /**
  13392. * Sets the parameters for this request.
  13393. *
  13394. * This method also re-initializes all properties.
  13395. *
  13396. * @param array $query The GET parameters
  13397. * @param array $request The POST parameters
  13398. * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  13399. * @param array $cookies The COOKIE parameters
  13400. * @param array $files The FILES parameters
  13401. * @param array $server The SERVER parameters
  13402. * @param string|resource|null $content The raw body data
  13403. * @static
  13404. */
  13405. public static function initialize($query = [], $request = [], $attributes = [], $cookies = [], $files = [], $server = [], $content = null)
  13406. {
  13407. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13408. /** @var \Illuminate\Http\Request $instance */
  13409. return $instance->initialize($query, $request, $attributes, $cookies, $files, $server, $content);
  13410. }
  13411. /**
  13412. * Creates a new request with values from PHP's super globals.
  13413. *
  13414. * @static
  13415. */
  13416. public static function createFromGlobals()
  13417. {
  13418. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13419. return \Illuminate\Http\Request::createFromGlobals();
  13420. }
  13421. /**
  13422. * Creates a Request based on a given URI and configuration.
  13423. *
  13424. * The information contained in the URI always take precedence
  13425. * over the other information (server and parameters).
  13426. *
  13427. * @param string $uri The URI
  13428. * @param string $method The HTTP method
  13429. * @param array $parameters The query (GET) or request (POST) parameters
  13430. * @param array $cookies The request cookies ($_COOKIE)
  13431. * @param array $files The request files ($_FILES)
  13432. * @param array $server The server parameters ($_SERVER)
  13433. * @param string|resource|null $content The raw body data
  13434. * @throws BadRequestException When the URI is invalid
  13435. * @static
  13436. */
  13437. public static function create($uri, $method = 'GET', $parameters = [], $cookies = [], $files = [], $server = [], $content = null)
  13438. {
  13439. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13440. return \Illuminate\Http\Request::create($uri, $method, $parameters, $cookies, $files, $server, $content);
  13441. }
  13442. /**
  13443. * Sets a callable able to create a Request instance.
  13444. *
  13445. * This is mainly useful when you need to override the Request class
  13446. * to keep BC with an existing system. It should not be used for any
  13447. * other purpose.
  13448. *
  13449. * @static
  13450. */
  13451. public static function setFactory($callable)
  13452. {
  13453. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13454. return \Illuminate\Http\Request::setFactory($callable);
  13455. }
  13456. /**
  13457. * Overrides the PHP global variables according to this request instance.
  13458. *
  13459. * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE.
  13460. * $_FILES is never overridden, see rfc1867
  13461. *
  13462. * @static
  13463. */
  13464. public static function overrideGlobals()
  13465. {
  13466. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13467. /** @var \Illuminate\Http\Request $instance */
  13468. return $instance->overrideGlobals();
  13469. }
  13470. /**
  13471. * Sets a list of trusted proxies.
  13472. *
  13473. * You should only list the reverse proxies that you manage directly.
  13474. *
  13475. * @param array $proxies A list of trusted proxies, the string 'REMOTE_ADDR' will be replaced with $_SERVER['REMOTE_ADDR'] and 'PRIVATE_SUBNETS' by IpUtils::PRIVATE_SUBNETS
  13476. * @param int-mask-of<Request::HEADER_*> $trustedHeaderSet A bit field to set which headers to trust from your proxies
  13477. * @static
  13478. */
  13479. public static function setTrustedProxies($proxies, $trustedHeaderSet)
  13480. {
  13481. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13482. return \Illuminate\Http\Request::setTrustedProxies($proxies, $trustedHeaderSet);
  13483. }
  13484. /**
  13485. * Gets the list of trusted proxies.
  13486. *
  13487. * @return string[]
  13488. * @static
  13489. */
  13490. public static function getTrustedProxies()
  13491. {
  13492. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13493. return \Illuminate\Http\Request::getTrustedProxies();
  13494. }
  13495. /**
  13496. * Gets the set of trusted headers from trusted proxies.
  13497. *
  13498. * @return int A bit field of Request::HEADER_* that defines which headers are trusted from your proxies
  13499. * @static
  13500. */
  13501. public static function getTrustedHeaderSet()
  13502. {
  13503. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13504. return \Illuminate\Http\Request::getTrustedHeaderSet();
  13505. }
  13506. /**
  13507. * Sets a list of trusted host patterns.
  13508. *
  13509. * You should only list the hosts you manage using regexs.
  13510. *
  13511. * @param array $hostPatterns A list of trusted host patterns
  13512. * @static
  13513. */
  13514. public static function setTrustedHosts($hostPatterns)
  13515. {
  13516. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13517. return \Illuminate\Http\Request::setTrustedHosts($hostPatterns);
  13518. }
  13519. /**
  13520. * Gets the list of trusted host patterns.
  13521. *
  13522. * @return string[]
  13523. * @static
  13524. */
  13525. public static function getTrustedHosts()
  13526. {
  13527. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13528. return \Illuminate\Http\Request::getTrustedHosts();
  13529. }
  13530. /**
  13531. * Normalizes a query string.
  13532. *
  13533. * It builds a normalized query string, where keys/value pairs are alphabetized,
  13534. * have consistent escaping and unneeded delimiters are removed.
  13535. *
  13536. * @static
  13537. */
  13538. public static function normalizeQueryString($qs)
  13539. {
  13540. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13541. return \Illuminate\Http\Request::normalizeQueryString($qs);
  13542. }
  13543. /**
  13544. * Enables support for the _method request parameter to determine the intended HTTP method.
  13545. *
  13546. * Be warned that enabling this feature might lead to CSRF issues in your code.
  13547. * Check that you are using CSRF tokens when required.
  13548. * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered
  13549. * and used to send a "PUT" or "DELETE" request via the _method request parameter.
  13550. * If these methods are not protected against CSRF, this presents a possible vulnerability.
  13551. *
  13552. * The HTTP method can only be overridden when the real HTTP method is POST.
  13553. *
  13554. * @static
  13555. */
  13556. public static function enableHttpMethodParameterOverride()
  13557. {
  13558. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13559. return \Illuminate\Http\Request::enableHttpMethodParameterOverride();
  13560. }
  13561. /**
  13562. * Checks whether support for the _method request parameter is enabled.
  13563. *
  13564. * @static
  13565. */
  13566. public static function getHttpMethodParameterOverride()
  13567. {
  13568. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13569. return \Illuminate\Http\Request::getHttpMethodParameterOverride();
  13570. }
  13571. /**
  13572. * Whether the request contains a Session which was started in one of the
  13573. * previous requests.
  13574. *
  13575. * @static
  13576. */
  13577. public static function hasPreviousSession()
  13578. {
  13579. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13580. /** @var \Illuminate\Http\Request $instance */
  13581. return $instance->hasPreviousSession();
  13582. }
  13583. /**
  13584. * @static
  13585. */
  13586. public static function setSession($session)
  13587. {
  13588. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13589. /** @var \Illuminate\Http\Request $instance */
  13590. return $instance->setSession($session);
  13591. }
  13592. /**
  13593. * @internal
  13594. * @param callable(): SessionInterface $factory
  13595. * @static
  13596. */
  13597. public static function setSessionFactory($factory)
  13598. {
  13599. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13600. /** @var \Illuminate\Http\Request $instance */
  13601. return $instance->setSessionFactory($factory);
  13602. }
  13603. /**
  13604. * Returns the client IP addresses.
  13605. *
  13606. * In the returned array the most trusted IP address is first, and the
  13607. * least trusted one last. The "real" client IP address is the last one,
  13608. * but this is also the least trusted one. Trusted proxies are stripped.
  13609. *
  13610. * Use this method carefully; you should use getClientIp() instead.
  13611. *
  13612. * @see getClientIp()
  13613. * @static
  13614. */
  13615. public static function getClientIps()
  13616. {
  13617. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13618. /** @var \Illuminate\Http\Request $instance */
  13619. return $instance->getClientIps();
  13620. }
  13621. /**
  13622. * Returns the client IP address.
  13623. *
  13624. * This method can read the client IP address from the "X-Forwarded-For" header
  13625. * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For"
  13626. * header value is a comma+space separated list of IP addresses, the left-most
  13627. * being the original client, and each successive proxy that passed the request
  13628. * adding the IP address where it received the request from.
  13629. *
  13630. * If your reverse proxy uses a different header name than "X-Forwarded-For",
  13631. * ("Client-Ip" for instance), configure it via the $trustedHeaderSet
  13632. * argument of the Request::setTrustedProxies() method instead.
  13633. *
  13634. * @see getClientIps()
  13635. * @see https://wikipedia.org/wiki/X-Forwarded-For
  13636. * @static
  13637. */
  13638. public static function getClientIp()
  13639. {
  13640. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13641. /** @var \Illuminate\Http\Request $instance */
  13642. return $instance->getClientIp();
  13643. }
  13644. /**
  13645. * Returns current script name.
  13646. *
  13647. * @static
  13648. */
  13649. public static function getScriptName()
  13650. {
  13651. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13652. /** @var \Illuminate\Http\Request $instance */
  13653. return $instance->getScriptName();
  13654. }
  13655. /**
  13656. * Returns the path being requested relative to the executed script.
  13657. *
  13658. * The path info always starts with a /.
  13659. *
  13660. * Suppose this request is instantiated from /mysite on localhost:
  13661. *
  13662. * * http://localhost/mysite returns an empty string
  13663. * * http://localhost/mysite/about returns '/about'
  13664. * * http://localhost/mysite/enco%20ded returns '/enco%20ded'
  13665. * * http://localhost/mysite/about?var=1 returns '/about'
  13666. *
  13667. * @return string The raw path (i.e. not urldecoded)
  13668. * @static
  13669. */
  13670. public static function getPathInfo()
  13671. {
  13672. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13673. /** @var \Illuminate\Http\Request $instance */
  13674. return $instance->getPathInfo();
  13675. }
  13676. /**
  13677. * Returns the root path from which this request is executed.
  13678. *
  13679. * Suppose that an index.php file instantiates this request object:
  13680. *
  13681. * * http://localhost/index.php returns an empty string
  13682. * * http://localhost/index.php/page returns an empty string
  13683. * * http://localhost/web/index.php returns '/web'
  13684. * * http://localhost/we%20b/index.php returns '/we%20b'
  13685. *
  13686. * @return string The raw path (i.e. not urldecoded)
  13687. * @static
  13688. */
  13689. public static function getBasePath()
  13690. {
  13691. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13692. /** @var \Illuminate\Http\Request $instance */
  13693. return $instance->getBasePath();
  13694. }
  13695. /**
  13696. * Returns the root URL from which this request is executed.
  13697. *
  13698. * The base URL never ends with a /.
  13699. *
  13700. * This is similar to getBasePath(), except that it also includes the
  13701. * script filename (e.g. index.php) if one exists.
  13702. *
  13703. * @return string The raw URL (i.e. not urldecoded)
  13704. * @static
  13705. */
  13706. public static function getBaseUrl()
  13707. {
  13708. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13709. /** @var \Illuminate\Http\Request $instance */
  13710. return $instance->getBaseUrl();
  13711. }
  13712. /**
  13713. * Gets the request's scheme.
  13714. *
  13715. * @static
  13716. */
  13717. public static function getScheme()
  13718. {
  13719. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13720. /** @var \Illuminate\Http\Request $instance */
  13721. return $instance->getScheme();
  13722. }
  13723. /**
  13724. * Returns the port on which the request is made.
  13725. *
  13726. * This method can read the client port from the "X-Forwarded-Port" header
  13727. * when trusted proxies were set via "setTrustedProxies()".
  13728. *
  13729. * The "X-Forwarded-Port" header must contain the client port.
  13730. *
  13731. * @return int|string|null Can be a string if fetched from the server bag
  13732. * @static
  13733. */
  13734. public static function getPort()
  13735. {
  13736. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13737. /** @var \Illuminate\Http\Request $instance */
  13738. return $instance->getPort();
  13739. }
  13740. /**
  13741. * Returns the user.
  13742. *
  13743. * @static
  13744. */
  13745. public static function getUser()
  13746. {
  13747. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13748. /** @var \Illuminate\Http\Request $instance */
  13749. return $instance->getUser();
  13750. }
  13751. /**
  13752. * Returns the password.
  13753. *
  13754. * @static
  13755. */
  13756. public static function getPassword()
  13757. {
  13758. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13759. /** @var \Illuminate\Http\Request $instance */
  13760. return $instance->getPassword();
  13761. }
  13762. /**
  13763. * Gets the user info.
  13764. *
  13765. * @return string|null A user name if any and, optionally, scheme-specific information about how to gain authorization to access the server
  13766. * @static
  13767. */
  13768. public static function getUserInfo()
  13769. {
  13770. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13771. /** @var \Illuminate\Http\Request $instance */
  13772. return $instance->getUserInfo();
  13773. }
  13774. /**
  13775. * Returns the HTTP host being requested.
  13776. *
  13777. * The port name will be appended to the host if it's non-standard.
  13778. *
  13779. * @static
  13780. */
  13781. public static function getHttpHost()
  13782. {
  13783. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13784. /** @var \Illuminate\Http\Request $instance */
  13785. return $instance->getHttpHost();
  13786. }
  13787. /**
  13788. * Returns the requested URI (path and query string).
  13789. *
  13790. * @return string The raw URI (i.e. not URI decoded)
  13791. * @static
  13792. */
  13793. public static function getRequestUri()
  13794. {
  13795. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13796. /** @var \Illuminate\Http\Request $instance */
  13797. return $instance->getRequestUri();
  13798. }
  13799. /**
  13800. * Gets the scheme and HTTP host.
  13801. *
  13802. * If the URL was called with basic authentication, the user
  13803. * and the password are not added to the generated string.
  13804. *
  13805. * @static
  13806. */
  13807. public static function getSchemeAndHttpHost()
  13808. {
  13809. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13810. /** @var \Illuminate\Http\Request $instance */
  13811. return $instance->getSchemeAndHttpHost();
  13812. }
  13813. /**
  13814. * Generates a normalized URI (URL) for the Request.
  13815. *
  13816. * @see getQueryString()
  13817. * @static
  13818. */
  13819. public static function getUri()
  13820. {
  13821. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13822. /** @var \Illuminate\Http\Request $instance */
  13823. return $instance->getUri();
  13824. }
  13825. /**
  13826. * Generates a normalized URI for the given path.
  13827. *
  13828. * @param string $path A path to use instead of the current one
  13829. * @static
  13830. */
  13831. public static function getUriForPath($path)
  13832. {
  13833. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13834. /** @var \Illuminate\Http\Request $instance */
  13835. return $instance->getUriForPath($path);
  13836. }
  13837. /**
  13838. * Returns the path as relative reference from the current Request path.
  13839. *
  13840. * Only the URIs path component (no schema, host etc.) is relevant and must be given.
  13841. * Both paths must be absolute and not contain relative parts.
  13842. * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives.
  13843. * Furthermore, they can be used to reduce the link size in documents.
  13844. *
  13845. * Example target paths, given a base path of "/a/b/c/d":
  13846. * - "/a/b/c/d" -> ""
  13847. * - "/a/b/c/" -> "./"
  13848. * - "/a/b/" -> "../"
  13849. * - "/a/b/c/other" -> "other"
  13850. * - "/a/x/y" -> "../../x/y"
  13851. *
  13852. * @static
  13853. */
  13854. public static function getRelativeUriForPath($path)
  13855. {
  13856. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13857. /** @var \Illuminate\Http\Request $instance */
  13858. return $instance->getRelativeUriForPath($path);
  13859. }
  13860. /**
  13861. * Generates the normalized query string for the Request.
  13862. *
  13863. * It builds a normalized query string, where keys/value pairs are alphabetized
  13864. * and have consistent escaping.
  13865. *
  13866. * @static
  13867. */
  13868. public static function getQueryString()
  13869. {
  13870. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13871. /** @var \Illuminate\Http\Request $instance */
  13872. return $instance->getQueryString();
  13873. }
  13874. /**
  13875. * Checks whether the request is secure or not.
  13876. *
  13877. * This method can read the client protocol from the "X-Forwarded-Proto" header
  13878. * when trusted proxies were set via "setTrustedProxies()".
  13879. *
  13880. * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".
  13881. *
  13882. * @static
  13883. */
  13884. public static function isSecure()
  13885. {
  13886. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13887. /** @var \Illuminate\Http\Request $instance */
  13888. return $instance->isSecure();
  13889. }
  13890. /**
  13891. * Returns the host name.
  13892. *
  13893. * This method can read the client host name from the "X-Forwarded-Host" header
  13894. * when trusted proxies were set via "setTrustedProxies()".
  13895. *
  13896. * The "X-Forwarded-Host" header must contain the client host name.
  13897. *
  13898. * @throws SuspiciousOperationException when the host name is invalid or not trusted
  13899. * @static
  13900. */
  13901. public static function getHost()
  13902. {
  13903. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13904. /** @var \Illuminate\Http\Request $instance */
  13905. return $instance->getHost();
  13906. }
  13907. /**
  13908. * Sets the request method.
  13909. *
  13910. * @static
  13911. */
  13912. public static function setMethod($method)
  13913. {
  13914. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13915. /** @var \Illuminate\Http\Request $instance */
  13916. return $instance->setMethod($method);
  13917. }
  13918. /**
  13919. * Gets the request "intended" method.
  13920. *
  13921. * If the X-HTTP-Method-Override header is set, and if the method is a POST,
  13922. * then it is used to determine the "real" intended HTTP method.
  13923. *
  13924. * The _method request parameter can also be used to determine the HTTP method,
  13925. * but only if enableHttpMethodParameterOverride() has been called.
  13926. *
  13927. * The method is always an uppercased string.
  13928. *
  13929. * @see getRealMethod()
  13930. * @static
  13931. */
  13932. public static function getMethod()
  13933. {
  13934. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13935. /** @var \Illuminate\Http\Request $instance */
  13936. return $instance->getMethod();
  13937. }
  13938. /**
  13939. * Gets the "real" request method.
  13940. *
  13941. * @see getMethod()
  13942. * @static
  13943. */
  13944. public static function getRealMethod()
  13945. {
  13946. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13947. /** @var \Illuminate\Http\Request $instance */
  13948. return $instance->getRealMethod();
  13949. }
  13950. /**
  13951. * Gets the mime type associated with the format.
  13952. *
  13953. * @static
  13954. */
  13955. public static function getMimeType($format)
  13956. {
  13957. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13958. /** @var \Illuminate\Http\Request $instance */
  13959. return $instance->getMimeType($format);
  13960. }
  13961. /**
  13962. * Gets the mime types associated with the format.
  13963. *
  13964. * @return string[]
  13965. * @static
  13966. */
  13967. public static function getMimeTypes($format)
  13968. {
  13969. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13970. return \Illuminate\Http\Request::getMimeTypes($format);
  13971. }
  13972. /**
  13973. * Gets the format associated with the mime type.
  13974. *
  13975. * @static
  13976. */
  13977. public static function getFormat($mimeType)
  13978. {
  13979. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13980. /** @var \Illuminate\Http\Request $instance */
  13981. return $instance->getFormat($mimeType);
  13982. }
  13983. /**
  13984. * Associates a format with mime types.
  13985. *
  13986. * @param string|string[] $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
  13987. * @static
  13988. */
  13989. public static function setFormat($format, $mimeTypes)
  13990. {
  13991. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13992. /** @var \Illuminate\Http\Request $instance */
  13993. return $instance->setFormat($format, $mimeTypes);
  13994. }
  13995. /**
  13996. * Gets the request format.
  13997. *
  13998. * Here is the process to determine the format:
  13999. *
  14000. * * format defined by the user (with setRequestFormat())
  14001. * * _format request attribute
  14002. * * $default
  14003. *
  14004. * @see getPreferredFormat
  14005. * @static
  14006. */
  14007. public static function getRequestFormat($default = 'html')
  14008. {
  14009. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14010. /** @var \Illuminate\Http\Request $instance */
  14011. return $instance->getRequestFormat($default);
  14012. }
  14013. /**
  14014. * Sets the request format.
  14015. *
  14016. * @static
  14017. */
  14018. public static function setRequestFormat($format)
  14019. {
  14020. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14021. /** @var \Illuminate\Http\Request $instance */
  14022. return $instance->setRequestFormat($format);
  14023. }
  14024. /**
  14025. * Gets the usual name of the format associated with the request's media type (provided in the Content-Type header).
  14026. *
  14027. * @see Request::$formats
  14028. * @static
  14029. */
  14030. public static function getContentTypeFormat()
  14031. {
  14032. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14033. /** @var \Illuminate\Http\Request $instance */
  14034. return $instance->getContentTypeFormat();
  14035. }
  14036. /**
  14037. * Sets the default locale.
  14038. *
  14039. * @static
  14040. */
  14041. public static function setDefaultLocale($locale)
  14042. {
  14043. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14044. /** @var \Illuminate\Http\Request $instance */
  14045. return $instance->setDefaultLocale($locale);
  14046. }
  14047. /**
  14048. * Get the default locale.
  14049. *
  14050. * @static
  14051. */
  14052. public static function getDefaultLocale()
  14053. {
  14054. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14055. /** @var \Illuminate\Http\Request $instance */
  14056. return $instance->getDefaultLocale();
  14057. }
  14058. /**
  14059. * Sets the locale.
  14060. *
  14061. * @static
  14062. */
  14063. public static function setLocale($locale)
  14064. {
  14065. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14066. /** @var \Illuminate\Http\Request $instance */
  14067. return $instance->setLocale($locale);
  14068. }
  14069. /**
  14070. * Get the locale.
  14071. *
  14072. * @static
  14073. */
  14074. public static function getLocale()
  14075. {
  14076. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14077. /** @var \Illuminate\Http\Request $instance */
  14078. return $instance->getLocale();
  14079. }
  14080. /**
  14081. * Checks if the request method is of specified type.
  14082. *
  14083. * @param string $method Uppercase request method (GET, POST etc)
  14084. * @static
  14085. */
  14086. public static function isMethod($method)
  14087. {
  14088. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14089. /** @var \Illuminate\Http\Request $instance */
  14090. return $instance->isMethod($method);
  14091. }
  14092. /**
  14093. * Checks whether or not the method is safe.
  14094. *
  14095. * @see https://tools.ietf.org/html/rfc7231#section-4.2.1
  14096. * @static
  14097. */
  14098. public static function isMethodSafe()
  14099. {
  14100. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14101. /** @var \Illuminate\Http\Request $instance */
  14102. return $instance->isMethodSafe();
  14103. }
  14104. /**
  14105. * Checks whether or not the method is idempotent.
  14106. *
  14107. * @static
  14108. */
  14109. public static function isMethodIdempotent()
  14110. {
  14111. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14112. /** @var \Illuminate\Http\Request $instance */
  14113. return $instance->isMethodIdempotent();
  14114. }
  14115. /**
  14116. * Checks whether the method is cacheable or not.
  14117. *
  14118. * @see https://tools.ietf.org/html/rfc7231#section-4.2.3
  14119. * @static
  14120. */
  14121. public static function isMethodCacheable()
  14122. {
  14123. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14124. /** @var \Illuminate\Http\Request $instance */
  14125. return $instance->isMethodCacheable();
  14126. }
  14127. /**
  14128. * Returns the protocol version.
  14129. *
  14130. * If the application is behind a proxy, the protocol version used in the
  14131. * requests between the client and the proxy and between the proxy and the
  14132. * server might be different. This returns the former (from the "Via" header)
  14133. * if the proxy is trusted (see "setTrustedProxies()"), otherwise it returns
  14134. * the latter (from the "SERVER_PROTOCOL" server parameter).
  14135. *
  14136. * @static
  14137. */
  14138. public static function getProtocolVersion()
  14139. {
  14140. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14141. /** @var \Illuminate\Http\Request $instance */
  14142. return $instance->getProtocolVersion();
  14143. }
  14144. /**
  14145. * Returns the request body content.
  14146. *
  14147. * @param bool $asResource If true, a resource will be returned
  14148. * @return string|resource
  14149. * @psalm-return ($asResource is true ? resource : string)
  14150. * @static
  14151. */
  14152. public static function getContent($asResource = false)
  14153. {
  14154. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14155. /** @var \Illuminate\Http\Request $instance */
  14156. return $instance->getContent($asResource);
  14157. }
  14158. /**
  14159. * Gets the decoded form or json request body.
  14160. *
  14161. * @throws JsonException When the body cannot be decoded to an array
  14162. * @static
  14163. */
  14164. public static function getPayload()
  14165. {
  14166. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14167. /** @var \Illuminate\Http\Request $instance */
  14168. return $instance->getPayload();
  14169. }
  14170. /**
  14171. * Gets the Etags.
  14172. *
  14173. * @static
  14174. */
  14175. public static function getETags()
  14176. {
  14177. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14178. /** @var \Illuminate\Http\Request $instance */
  14179. return $instance->getETags();
  14180. }
  14181. /**
  14182. * @static
  14183. */
  14184. public static function isNoCache()
  14185. {
  14186. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14187. /** @var \Illuminate\Http\Request $instance */
  14188. return $instance->isNoCache();
  14189. }
  14190. /**
  14191. * Gets the preferred format for the response by inspecting, in the following order:
  14192. * * the request format set using setRequestFormat;
  14193. * * the values of the Accept HTTP header.
  14194. *
  14195. * Note that if you use this method, you should send the "Vary: Accept" header
  14196. * in the response to prevent any issues with intermediary HTTP caches.
  14197. *
  14198. * @static
  14199. */
  14200. public static function getPreferredFormat($default = 'html')
  14201. {
  14202. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14203. /** @var \Illuminate\Http\Request $instance */
  14204. return $instance->getPreferredFormat($default);
  14205. }
  14206. /**
  14207. * Returns the preferred language.
  14208. *
  14209. * @param string[] $locales An array of ordered available locales
  14210. * @static
  14211. */
  14212. public static function getPreferredLanguage($locales = null)
  14213. {
  14214. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14215. /** @var \Illuminate\Http\Request $instance */
  14216. return $instance->getPreferredLanguage($locales);
  14217. }
  14218. /**
  14219. * Gets a list of languages acceptable by the client browser ordered in the user browser preferences.
  14220. *
  14221. * @return string[]
  14222. * @static
  14223. */
  14224. public static function getLanguages()
  14225. {
  14226. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14227. /** @var \Illuminate\Http\Request $instance */
  14228. return $instance->getLanguages();
  14229. }
  14230. /**
  14231. * Gets a list of charsets acceptable by the client browser in preferable order.
  14232. *
  14233. * @return string[]
  14234. * @static
  14235. */
  14236. public static function getCharsets()
  14237. {
  14238. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14239. /** @var \Illuminate\Http\Request $instance */
  14240. return $instance->getCharsets();
  14241. }
  14242. /**
  14243. * Gets a list of encodings acceptable by the client browser in preferable order.
  14244. *
  14245. * @return string[]
  14246. * @static
  14247. */
  14248. public static function getEncodings()
  14249. {
  14250. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14251. /** @var \Illuminate\Http\Request $instance */
  14252. return $instance->getEncodings();
  14253. }
  14254. /**
  14255. * Gets a list of content types acceptable by the client browser in preferable order.
  14256. *
  14257. * @return string[]
  14258. * @static
  14259. */
  14260. public static function getAcceptableContentTypes()
  14261. {
  14262. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14263. /** @var \Illuminate\Http\Request $instance */
  14264. return $instance->getAcceptableContentTypes();
  14265. }
  14266. /**
  14267. * Returns true if the request is an XMLHttpRequest.
  14268. *
  14269. * It works if your JavaScript library sets an X-Requested-With HTTP header.
  14270. * It is known to work with common JavaScript frameworks:
  14271. *
  14272. * @see https://wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
  14273. * @static
  14274. */
  14275. public static function isXmlHttpRequest()
  14276. {
  14277. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14278. /** @var \Illuminate\Http\Request $instance */
  14279. return $instance->isXmlHttpRequest();
  14280. }
  14281. /**
  14282. * Checks whether the client browser prefers safe content or not according to RFC8674.
  14283. *
  14284. * @see https://tools.ietf.org/html/rfc8674
  14285. * @static
  14286. */
  14287. public static function preferSafeContent()
  14288. {
  14289. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14290. /** @var \Illuminate\Http\Request $instance */
  14291. return $instance->preferSafeContent();
  14292. }
  14293. /**
  14294. * Indicates whether this request originated from a trusted proxy.
  14295. *
  14296. * This can be useful to determine whether or not to trust the
  14297. * contents of a proxy-specific header.
  14298. *
  14299. * @static
  14300. */
  14301. public static function isFromTrustedProxy()
  14302. {
  14303. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14304. /** @var \Illuminate\Http\Request $instance */
  14305. return $instance->isFromTrustedProxy();
  14306. }
  14307. /**
  14308. * Filter the given array of rules into an array of rules that are included in precognitive headers.
  14309. *
  14310. * @param array $rules
  14311. * @return array
  14312. * @static
  14313. */
  14314. public static function filterPrecognitiveRules($rules)
  14315. {
  14316. /** @var \Illuminate\Http\Request $instance */
  14317. return $instance->filterPrecognitiveRules($rules);
  14318. }
  14319. /**
  14320. * Determine if the request is attempting to be precognitive.
  14321. *
  14322. * @return bool
  14323. * @static
  14324. */
  14325. public static function isAttemptingPrecognition()
  14326. {
  14327. /** @var \Illuminate\Http\Request $instance */
  14328. return $instance->isAttemptingPrecognition();
  14329. }
  14330. /**
  14331. * Determine if the request is precognitive.
  14332. *
  14333. * @return bool
  14334. * @static
  14335. */
  14336. public static function isPrecognitive()
  14337. {
  14338. /** @var \Illuminate\Http\Request $instance */
  14339. return $instance->isPrecognitive();
  14340. }
  14341. /**
  14342. * Determine if the request is sending JSON.
  14343. *
  14344. * @return bool
  14345. * @static
  14346. */
  14347. public static function isJson()
  14348. {
  14349. /** @var \Illuminate\Http\Request $instance */
  14350. return $instance->isJson();
  14351. }
  14352. /**
  14353. * Determine if the current request probably expects a JSON response.
  14354. *
  14355. * @return bool
  14356. * @static
  14357. */
  14358. public static function expectsJson()
  14359. {
  14360. /** @var \Illuminate\Http\Request $instance */
  14361. return $instance->expectsJson();
  14362. }
  14363. /**
  14364. * Determine if the current request is asking for JSON.
  14365. *
  14366. * @return bool
  14367. * @static
  14368. */
  14369. public static function wantsJson()
  14370. {
  14371. /** @var \Illuminate\Http\Request $instance */
  14372. return $instance->wantsJson();
  14373. }
  14374. /**
  14375. * Determines whether the current requests accepts a given content type.
  14376. *
  14377. * @param string|array $contentTypes
  14378. * @return bool
  14379. * @static
  14380. */
  14381. public static function accepts($contentTypes)
  14382. {
  14383. /** @var \Illuminate\Http\Request $instance */
  14384. return $instance->accepts($contentTypes);
  14385. }
  14386. /**
  14387. * Return the most suitable content type from the given array based on content negotiation.
  14388. *
  14389. * @param string|array $contentTypes
  14390. * @return string|null
  14391. * @static
  14392. */
  14393. public static function prefers($contentTypes)
  14394. {
  14395. /** @var \Illuminate\Http\Request $instance */
  14396. return $instance->prefers($contentTypes);
  14397. }
  14398. /**
  14399. * Determine if the current request accepts any content type.
  14400. *
  14401. * @return bool
  14402. * @static
  14403. */
  14404. public static function acceptsAnyContentType()
  14405. {
  14406. /** @var \Illuminate\Http\Request $instance */
  14407. return $instance->acceptsAnyContentType();
  14408. }
  14409. /**
  14410. * Determines whether a request accepts JSON.
  14411. *
  14412. * @return bool
  14413. * @static
  14414. */
  14415. public static function acceptsJson()
  14416. {
  14417. /** @var \Illuminate\Http\Request $instance */
  14418. return $instance->acceptsJson();
  14419. }
  14420. /**
  14421. * Determines whether a request accepts HTML.
  14422. *
  14423. * @return bool
  14424. * @static
  14425. */
  14426. public static function acceptsHtml()
  14427. {
  14428. /** @var \Illuminate\Http\Request $instance */
  14429. return $instance->acceptsHtml();
  14430. }
  14431. /**
  14432. * Determine if the given content types match.
  14433. *
  14434. * @param string $actual
  14435. * @param string $type
  14436. * @return bool
  14437. * @static
  14438. */
  14439. public static function matchesType($actual, $type)
  14440. {
  14441. return \Illuminate\Http\Request::matchesType($actual, $type);
  14442. }
  14443. /**
  14444. * Get the data format expected in the response.
  14445. *
  14446. * @param string $default
  14447. * @return string
  14448. * @static
  14449. */
  14450. public static function format($default = 'html')
  14451. {
  14452. /** @var \Illuminate\Http\Request $instance */
  14453. return $instance->format($default);
  14454. }
  14455. /**
  14456. * Retrieve an old input item.
  14457. *
  14458. * @param string|null $key
  14459. * @param \Illuminate\Database\Eloquent\Model|string|array|null $default
  14460. * @return string|array|null
  14461. * @static
  14462. */
  14463. public static function old($key = null, $default = null)
  14464. {
  14465. /** @var \Illuminate\Http\Request $instance */
  14466. return $instance->old($key, $default);
  14467. }
  14468. /**
  14469. * Flash the input for the current request to the session.
  14470. *
  14471. * @return void
  14472. * @static
  14473. */
  14474. public static function flash()
  14475. {
  14476. /** @var \Illuminate\Http\Request $instance */
  14477. $instance->flash();
  14478. }
  14479. /**
  14480. * Flash only some of the input to the session.
  14481. *
  14482. * @param array|mixed $keys
  14483. * @return void
  14484. * @static
  14485. */
  14486. public static function flashOnly($keys)
  14487. {
  14488. /** @var \Illuminate\Http\Request $instance */
  14489. $instance->flashOnly($keys);
  14490. }
  14491. /**
  14492. * Flash only some of the input to the session.
  14493. *
  14494. * @param array|mixed $keys
  14495. * @return void
  14496. * @static
  14497. */
  14498. public static function flashExcept($keys)
  14499. {
  14500. /** @var \Illuminate\Http\Request $instance */
  14501. $instance->flashExcept($keys);
  14502. }
  14503. /**
  14504. * Flush all of the old input from the session.
  14505. *
  14506. * @return void
  14507. * @static
  14508. */
  14509. public static function flush()
  14510. {
  14511. /** @var \Illuminate\Http\Request $instance */
  14512. $instance->flush();
  14513. }
  14514. /**
  14515. * Retrieve a server variable from the request.
  14516. *
  14517. * @param string|null $key
  14518. * @param string|array|null $default
  14519. * @return string|array|null
  14520. * @static
  14521. */
  14522. public static function server($key = null, $default = null)
  14523. {
  14524. /** @var \Illuminate\Http\Request $instance */
  14525. return $instance->server($key, $default);
  14526. }
  14527. /**
  14528. * Determine if a header is set on the request.
  14529. *
  14530. * @param string $key
  14531. * @return bool
  14532. * @static
  14533. */
  14534. public static function hasHeader($key)
  14535. {
  14536. /** @var \Illuminate\Http\Request $instance */
  14537. return $instance->hasHeader($key);
  14538. }
  14539. /**
  14540. * Retrieve a header from the request.
  14541. *
  14542. * @param string|null $key
  14543. * @param string|array|null $default
  14544. * @return string|array|null
  14545. * @static
  14546. */
  14547. public static function header($key = null, $default = null)
  14548. {
  14549. /** @var \Illuminate\Http\Request $instance */
  14550. return $instance->header($key, $default);
  14551. }
  14552. /**
  14553. * Get the bearer token from the request headers.
  14554. *
  14555. * @return string|null
  14556. * @static
  14557. */
  14558. public static function bearerToken()
  14559. {
  14560. /** @var \Illuminate\Http\Request $instance */
  14561. return $instance->bearerToken();
  14562. }
  14563. /**
  14564. * Get the keys for all of the input and files.
  14565. *
  14566. * @return array
  14567. * @static
  14568. */
  14569. public static function keys()
  14570. {
  14571. /** @var \Illuminate\Http\Request $instance */
  14572. return $instance->keys();
  14573. }
  14574. /**
  14575. * Get all of the input and files for the request.
  14576. *
  14577. * @param array|mixed|null $keys
  14578. * @return array
  14579. * @static
  14580. */
  14581. public static function all($keys = null)
  14582. {
  14583. /** @var \Illuminate\Http\Request $instance */
  14584. return $instance->all($keys);
  14585. }
  14586. /**
  14587. * Retrieve an input item from the request.
  14588. *
  14589. * @param string|null $key
  14590. * @param mixed $default
  14591. * @return mixed
  14592. * @static
  14593. */
  14594. public static function input($key = null, $default = null)
  14595. {
  14596. /** @var \Illuminate\Http\Request $instance */
  14597. return $instance->input($key, $default);
  14598. }
  14599. /**
  14600. * Retrieve input from the request as a Fluent object instance.
  14601. *
  14602. * @param array|string|null $key
  14603. * @return \Illuminate\Support\Fluent
  14604. * @static
  14605. */
  14606. public static function fluent($key = null)
  14607. {
  14608. /** @var \Illuminate\Http\Request $instance */
  14609. return $instance->fluent($key);
  14610. }
  14611. /**
  14612. * Retrieve a query string item from the request.
  14613. *
  14614. * @param string|null $key
  14615. * @param string|array|null $default
  14616. * @return string|array|null
  14617. * @static
  14618. */
  14619. public static function query($key = null, $default = null)
  14620. {
  14621. /** @var \Illuminate\Http\Request $instance */
  14622. return $instance->query($key, $default);
  14623. }
  14624. /**
  14625. * Retrieve a request payload item from the request.
  14626. *
  14627. * @param string|null $key
  14628. * @param string|array|null $default
  14629. * @return string|array|null
  14630. * @static
  14631. */
  14632. public static function post($key = null, $default = null)
  14633. {
  14634. /** @var \Illuminate\Http\Request $instance */
  14635. return $instance->post($key, $default);
  14636. }
  14637. /**
  14638. * Determine if a cookie is set on the request.
  14639. *
  14640. * @param string $key
  14641. * @return bool
  14642. * @static
  14643. */
  14644. public static function hasCookie($key)
  14645. {
  14646. /** @var \Illuminate\Http\Request $instance */
  14647. return $instance->hasCookie($key);
  14648. }
  14649. /**
  14650. * Retrieve a cookie from the request.
  14651. *
  14652. * @param string|null $key
  14653. * @param string|array|null $default
  14654. * @return string|array|null
  14655. * @static
  14656. */
  14657. public static function cookie($key = null, $default = null)
  14658. {
  14659. /** @var \Illuminate\Http\Request $instance */
  14660. return $instance->cookie($key, $default);
  14661. }
  14662. /**
  14663. * Get an array of all of the files on the request.
  14664. *
  14665. * @return array<string, \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]>
  14666. * @static
  14667. */
  14668. public static function allFiles()
  14669. {
  14670. /** @var \Illuminate\Http\Request $instance */
  14671. return $instance->allFiles();
  14672. }
  14673. /**
  14674. * Determine if the uploaded data contains a file.
  14675. *
  14676. * @param string $key
  14677. * @return bool
  14678. * @static
  14679. */
  14680. public static function hasFile($key)
  14681. {
  14682. /** @var \Illuminate\Http\Request $instance */
  14683. return $instance->hasFile($key);
  14684. }
  14685. /**
  14686. * Retrieve a file from the request.
  14687. *
  14688. * @param string|null $key
  14689. * @param mixed $default
  14690. * @return ($key is null ? array<string, \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]> : \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]|null)
  14691. * @static
  14692. */
  14693. public static function file($key = null, $default = null)
  14694. {
  14695. /** @var \Illuminate\Http\Request $instance */
  14696. return $instance->file($key, $default);
  14697. }
  14698. /**
  14699. * Dump the items.
  14700. *
  14701. * @param mixed $keys
  14702. * @return \Illuminate\Http\Request
  14703. * @static
  14704. */
  14705. public static function dump($keys = [])
  14706. {
  14707. /** @var \Illuminate\Http\Request $instance */
  14708. return $instance->dump($keys);
  14709. }
  14710. /**
  14711. * Dump the given arguments and terminate execution.
  14712. *
  14713. * @param mixed $args
  14714. * @return never
  14715. * @static
  14716. */
  14717. public static function dd(...$args)
  14718. {
  14719. /** @var \Illuminate\Http\Request $instance */
  14720. return $instance->dd(...$args);
  14721. }
  14722. /**
  14723. * Determine if the data contains a given key.
  14724. *
  14725. * @param string|array $key
  14726. * @return bool
  14727. * @static
  14728. */
  14729. public static function exists($key)
  14730. {
  14731. /** @var \Illuminate\Http\Request $instance */
  14732. return $instance->exists($key);
  14733. }
  14734. /**
  14735. * Determine if the data contains a given key.
  14736. *
  14737. * @param string|array $key
  14738. * @return bool
  14739. * @static
  14740. */
  14741. public static function has($key)
  14742. {
  14743. /** @var \Illuminate\Http\Request $instance */
  14744. return $instance->has($key);
  14745. }
  14746. /**
  14747. * Determine if the instance contains any of the given keys.
  14748. *
  14749. * @param string|array $keys
  14750. * @return bool
  14751. * @static
  14752. */
  14753. public static function hasAny($keys)
  14754. {
  14755. /** @var \Illuminate\Http\Request $instance */
  14756. return $instance->hasAny($keys);
  14757. }
  14758. /**
  14759. * Apply the callback if the instance contains the given key.
  14760. *
  14761. * @param string $key
  14762. * @param callable $callback
  14763. * @param callable|null $default
  14764. * @return $this|mixed
  14765. * @static
  14766. */
  14767. public static function whenHas($key, $callback, $default = null)
  14768. {
  14769. /** @var \Illuminate\Http\Request $instance */
  14770. return $instance->whenHas($key, $callback, $default);
  14771. }
  14772. /**
  14773. * Determine if the instance contains a non-empty value for the given key.
  14774. *
  14775. * @param string|array $key
  14776. * @return bool
  14777. * @static
  14778. */
  14779. public static function filled($key)
  14780. {
  14781. /** @var \Illuminate\Http\Request $instance */
  14782. return $instance->filled($key);
  14783. }
  14784. /**
  14785. * Determine if the instance contains an empty value for the given key.
  14786. *
  14787. * @param string|array $key
  14788. * @return bool
  14789. * @static
  14790. */
  14791. public static function isNotFilled($key)
  14792. {
  14793. /** @var \Illuminate\Http\Request $instance */
  14794. return $instance->isNotFilled($key);
  14795. }
  14796. /**
  14797. * Determine if the instance contains a non-empty value for any of the given keys.
  14798. *
  14799. * @param string|array $keys
  14800. * @return bool
  14801. * @static
  14802. */
  14803. public static function anyFilled($keys)
  14804. {
  14805. /** @var \Illuminate\Http\Request $instance */
  14806. return $instance->anyFilled($keys);
  14807. }
  14808. /**
  14809. * Apply the callback if the instance contains a non-empty value for the given key.
  14810. *
  14811. * @param string $key
  14812. * @param callable $callback
  14813. * @param callable|null $default
  14814. * @return $this|mixed
  14815. * @static
  14816. */
  14817. public static function whenFilled($key, $callback, $default = null)
  14818. {
  14819. /** @var \Illuminate\Http\Request $instance */
  14820. return $instance->whenFilled($key, $callback, $default);
  14821. }
  14822. /**
  14823. * Determine if the instance is missing a given key.
  14824. *
  14825. * @param string|array $key
  14826. * @return bool
  14827. * @static
  14828. */
  14829. public static function missing($key)
  14830. {
  14831. /** @var \Illuminate\Http\Request $instance */
  14832. return $instance->missing($key);
  14833. }
  14834. /**
  14835. * Apply the callback if the instance is missing the given key.
  14836. *
  14837. * @param string $key
  14838. * @param callable $callback
  14839. * @param callable|null $default
  14840. * @return $this|mixed
  14841. * @static
  14842. */
  14843. public static function whenMissing($key, $callback, $default = null)
  14844. {
  14845. /** @var \Illuminate\Http\Request $instance */
  14846. return $instance->whenMissing($key, $callback, $default);
  14847. }
  14848. /**
  14849. * Retrieve data from the instance as a Stringable instance.
  14850. *
  14851. * @param string $key
  14852. * @param mixed $default
  14853. * @return \Illuminate\Support\Stringable
  14854. * @static
  14855. */
  14856. public static function str($key, $default = null)
  14857. {
  14858. /** @var \Illuminate\Http\Request $instance */
  14859. return $instance->str($key, $default);
  14860. }
  14861. /**
  14862. * Retrieve data from the instance as a Stringable instance.
  14863. *
  14864. * @param string $key
  14865. * @param mixed $default
  14866. * @return \Illuminate\Support\Stringable
  14867. * @static
  14868. */
  14869. public static function string($key, $default = null)
  14870. {
  14871. /** @var \Illuminate\Http\Request $instance */
  14872. return $instance->string($key, $default);
  14873. }
  14874. /**
  14875. * Retrieve data as a boolean value.
  14876. *
  14877. * Returns true when value is "1", "true", "on", and "yes". Otherwise, returns false.
  14878. *
  14879. * @param string|null $key
  14880. * @param bool $default
  14881. * @return bool
  14882. * @static
  14883. */
  14884. public static function boolean($key = null, $default = false)
  14885. {
  14886. /** @var \Illuminate\Http\Request $instance */
  14887. return $instance->boolean($key, $default);
  14888. }
  14889. /**
  14890. * Retrieve data as an integer value.
  14891. *
  14892. * @param string $key
  14893. * @param int $default
  14894. * @return int
  14895. * @static
  14896. */
  14897. public static function integer($key, $default = 0)
  14898. {
  14899. /** @var \Illuminate\Http\Request $instance */
  14900. return $instance->integer($key, $default);
  14901. }
  14902. /**
  14903. * Retrieve data as a float value.
  14904. *
  14905. * @param string $key
  14906. * @param float $default
  14907. * @return float
  14908. * @static
  14909. */
  14910. public static function float($key, $default = 0.0)
  14911. {
  14912. /** @var \Illuminate\Http\Request $instance */
  14913. return $instance->float($key, $default);
  14914. }
  14915. /**
  14916. * Retrieve data from the instance as a Carbon instance.
  14917. *
  14918. * @param string $key
  14919. * @param string|null $format
  14920. * @param string|null $tz
  14921. * @return \Illuminate\Support\Carbon|null
  14922. * @throws \Carbon\Exceptions\InvalidFormatException
  14923. * @static
  14924. */
  14925. public static function date($key, $format = null, $tz = null)
  14926. {
  14927. /** @var \Illuminate\Http\Request $instance */
  14928. return $instance->date($key, $format, $tz);
  14929. }
  14930. /**
  14931. * Retrieve data from the instance as an enum.
  14932. *
  14933. * @template TEnum of \BackedEnum
  14934. * @param string $key
  14935. * @param class-string<TEnum> $enumClass
  14936. * @param TEnum|null $default
  14937. * @return TEnum|null
  14938. * @static
  14939. */
  14940. public static function enum($key, $enumClass, $default = null)
  14941. {
  14942. /** @var \Illuminate\Http\Request $instance */
  14943. return $instance->enum($key, $enumClass, $default);
  14944. }
  14945. /**
  14946. * Retrieve data from the instance as an array of enums.
  14947. *
  14948. * @template TEnum of \BackedEnum
  14949. * @param string $key
  14950. * @param class-string<TEnum> $enumClass
  14951. * @return TEnum[]
  14952. * @static
  14953. */
  14954. public static function enums($key, $enumClass)
  14955. {
  14956. /** @var \Illuminate\Http\Request $instance */
  14957. return $instance->enums($key, $enumClass);
  14958. }
  14959. /**
  14960. * Retrieve data from the instance as an array.
  14961. *
  14962. * @param array|string|null $key
  14963. * @return array
  14964. * @static
  14965. */
  14966. public static function array($key = null)
  14967. {
  14968. /** @var \Illuminate\Http\Request $instance */
  14969. return $instance->array($key);
  14970. }
  14971. /**
  14972. * Retrieve data from the instance as a collection.
  14973. *
  14974. * @param array|string|null $key
  14975. * @return \Illuminate\Support\Collection
  14976. * @static
  14977. */
  14978. public static function collect($key = null)
  14979. {
  14980. /** @var \Illuminate\Http\Request $instance */
  14981. return $instance->collect($key);
  14982. }
  14983. /**
  14984. * Get a subset containing the provided keys with values from the instance data.
  14985. *
  14986. * @param array|mixed $keys
  14987. * @return array
  14988. * @static
  14989. */
  14990. public static function only($keys)
  14991. {
  14992. /** @var \Illuminate\Http\Request $instance */
  14993. return $instance->only($keys);
  14994. }
  14995. /**
  14996. * Get all of the data except for a specified array of items.
  14997. *
  14998. * @param array|mixed $keys
  14999. * @return array
  15000. * @static
  15001. */
  15002. public static function except($keys)
  15003. {
  15004. /** @var \Illuminate\Http\Request $instance */
  15005. return $instance->except($keys);
  15006. }
  15007. /**
  15008. * Apply the callback if the given "value" is (or resolves to) truthy.
  15009. *
  15010. * @template TWhenParameter
  15011. * @template TWhenReturnType
  15012. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  15013. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  15014. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  15015. * @return $this|TWhenReturnType
  15016. * @static
  15017. */
  15018. public static function when($value = null, $callback = null, $default = null)
  15019. {
  15020. /** @var \Illuminate\Http\Request $instance */
  15021. return $instance->when($value, $callback, $default);
  15022. }
  15023. /**
  15024. * Apply the callback if the given "value" is (or resolves to) falsy.
  15025. *
  15026. * @template TUnlessParameter
  15027. * @template TUnlessReturnType
  15028. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  15029. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  15030. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  15031. * @return $this|TUnlessReturnType
  15032. * @static
  15033. */
  15034. public static function unless($value = null, $callback = null, $default = null)
  15035. {
  15036. /** @var \Illuminate\Http\Request $instance */
  15037. return $instance->unless($value, $callback, $default);
  15038. }
  15039. /**
  15040. * Register a custom macro.
  15041. *
  15042. * @param string $name
  15043. * @param object|callable $macro
  15044. * @param-closure-this static $macro
  15045. * @return void
  15046. * @static
  15047. */
  15048. public static function macro($name, $macro)
  15049. {
  15050. \Illuminate\Http\Request::macro($name, $macro);
  15051. }
  15052. /**
  15053. * Mix another object into the class.
  15054. *
  15055. * @param object $mixin
  15056. * @param bool $replace
  15057. * @return void
  15058. * @throws \ReflectionException
  15059. * @static
  15060. */
  15061. public static function mixin($mixin, $replace = true)
  15062. {
  15063. \Illuminate\Http\Request::mixin($mixin, $replace);
  15064. }
  15065. /**
  15066. * Checks if macro is registered.
  15067. *
  15068. * @param string $name
  15069. * @return bool
  15070. * @static
  15071. */
  15072. public static function hasMacro($name)
  15073. {
  15074. return \Illuminate\Http\Request::hasMacro($name);
  15075. }
  15076. /**
  15077. * Flush the existing macros.
  15078. *
  15079. * @return void
  15080. * @static
  15081. */
  15082. public static function flushMacros()
  15083. {
  15084. \Illuminate\Http\Request::flushMacros();
  15085. }
  15086. /**
  15087. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  15088. * @param array $rules
  15089. * @param mixed $params
  15090. * @static
  15091. */
  15092. public static function validate($rules, ...$params)
  15093. {
  15094. return \Illuminate\Http\Request::validate($rules, ...$params);
  15095. }
  15096. /**
  15097. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  15098. * @param string $errorBag
  15099. * @param array $rules
  15100. * @param mixed $params
  15101. * @static
  15102. */
  15103. public static function validateWithBag($errorBag, $rules, ...$params)
  15104. {
  15105. return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params);
  15106. }
  15107. /**
  15108. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15109. * @param mixed $absolute
  15110. * @static
  15111. */
  15112. public static function hasValidSignature($absolute = true)
  15113. {
  15114. return \Illuminate\Http\Request::hasValidSignature($absolute);
  15115. }
  15116. /**
  15117. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15118. * @static
  15119. */
  15120. public static function hasValidRelativeSignature()
  15121. {
  15122. return \Illuminate\Http\Request::hasValidRelativeSignature();
  15123. }
  15124. /**
  15125. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15126. * @param mixed $ignoreQuery
  15127. * @param mixed $absolute
  15128. * @static
  15129. */
  15130. public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true)
  15131. {
  15132. return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute);
  15133. }
  15134. /**
  15135. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15136. * @param mixed $ignoreQuery
  15137. * @static
  15138. */
  15139. public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = [])
  15140. {
  15141. return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery);
  15142. }
  15143. }
  15144. /**
  15145. * @see \Illuminate\Routing\ResponseFactory
  15146. */
  15147. class Response {
  15148. /**
  15149. * Create a new response instance.
  15150. *
  15151. * @param mixed $content
  15152. * @param int $status
  15153. * @param array $headers
  15154. * @return \Illuminate\Http\Response
  15155. * @static
  15156. */
  15157. public static function make($content = '', $status = 200, $headers = [])
  15158. {
  15159. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15160. return $instance->make($content, $status, $headers);
  15161. }
  15162. /**
  15163. * Create a new "no content" response.
  15164. *
  15165. * @param int $status
  15166. * @param array $headers
  15167. * @return \Illuminate\Http\Response
  15168. * @static
  15169. */
  15170. public static function noContent($status = 204, $headers = [])
  15171. {
  15172. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15173. return $instance->noContent($status, $headers);
  15174. }
  15175. /**
  15176. * Create a new response for a given view.
  15177. *
  15178. * @param string|array $view
  15179. * @param array $data
  15180. * @param int $status
  15181. * @param array $headers
  15182. * @return \Illuminate\Http\Response
  15183. * @static
  15184. */
  15185. public static function view($view, $data = [], $status = 200, $headers = [])
  15186. {
  15187. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15188. return $instance->view($view, $data, $status, $headers);
  15189. }
  15190. /**
  15191. * Create a new JSON response instance.
  15192. *
  15193. * @param mixed $data
  15194. * @param int $status
  15195. * @param array $headers
  15196. * @param int $options
  15197. * @return \Illuminate\Http\JsonResponse
  15198. * @static
  15199. */
  15200. public static function json($data = [], $status = 200, $headers = [], $options = 0)
  15201. {
  15202. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15203. return $instance->json($data, $status, $headers, $options);
  15204. }
  15205. /**
  15206. * Create a new JSONP response instance.
  15207. *
  15208. * @param string $callback
  15209. * @param mixed $data
  15210. * @param int $status
  15211. * @param array $headers
  15212. * @param int $options
  15213. * @return \Illuminate\Http\JsonResponse
  15214. * @static
  15215. */
  15216. public static function jsonp($callback, $data = [], $status = 200, $headers = [], $options = 0)
  15217. {
  15218. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15219. return $instance->jsonp($callback, $data, $status, $headers, $options);
  15220. }
  15221. /**
  15222. * Create a new event stream response.
  15223. *
  15224. * @param \Closure $callback
  15225. * @param array $headers
  15226. * @param \Illuminate\Http\StreamedEvent|string|null $endStreamWith
  15227. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15228. * @static
  15229. */
  15230. public static function eventStream($callback, $headers = [], $endStreamWith = '</stream>')
  15231. {
  15232. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15233. return $instance->eventStream($callback, $headers, $endStreamWith);
  15234. }
  15235. /**
  15236. * Create a new streamed response instance.
  15237. *
  15238. * @param callable|null $callback
  15239. * @param int $status
  15240. * @param array $headers
  15241. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15242. * @static
  15243. */
  15244. public static function stream($callback, $status = 200, $headers = [])
  15245. {
  15246. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15247. return $instance->stream($callback, $status, $headers);
  15248. }
  15249. /**
  15250. * Create a new streamed JSON response instance.
  15251. *
  15252. * @param array $data
  15253. * @param int $status
  15254. * @param array $headers
  15255. * @param int $encodingOptions
  15256. * @return \Symfony\Component\HttpFoundation\StreamedJsonResponse
  15257. * @static
  15258. */
  15259. public static function streamJson($data, $status = 200, $headers = [], $encodingOptions = 15)
  15260. {
  15261. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15262. return $instance->streamJson($data, $status, $headers, $encodingOptions);
  15263. }
  15264. /**
  15265. * Create a new streamed response instance as a file download.
  15266. *
  15267. * @param callable $callback
  15268. * @param string|null $name
  15269. * @param array $headers
  15270. * @param string|null $disposition
  15271. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15272. * @throws \Illuminate\Routing\Exceptions\StreamedResponseException
  15273. * @static
  15274. */
  15275. public static function streamDownload($callback, $name = null, $headers = [], $disposition = 'attachment')
  15276. {
  15277. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15278. return $instance->streamDownload($callback, $name, $headers, $disposition);
  15279. }
  15280. /**
  15281. * Create a new file download response.
  15282. *
  15283. * @param \SplFileInfo|string $file
  15284. * @param string|null $name
  15285. * @param array $headers
  15286. * @param string|null $disposition
  15287. * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
  15288. * @static
  15289. */
  15290. public static function download($file, $name = null, $headers = [], $disposition = 'attachment')
  15291. {
  15292. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15293. return $instance->download($file, $name, $headers, $disposition);
  15294. }
  15295. /**
  15296. * Return the raw contents of a binary file.
  15297. *
  15298. * @param \SplFileInfo|string $file
  15299. * @param array $headers
  15300. * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
  15301. * @static
  15302. */
  15303. public static function file($file, $headers = [])
  15304. {
  15305. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15306. return $instance->file($file, $headers);
  15307. }
  15308. /**
  15309. * Create a new redirect response to the given path.
  15310. *
  15311. * @param string $path
  15312. * @param int $status
  15313. * @param array $headers
  15314. * @param bool|null $secure
  15315. * @return \Illuminate\Http\RedirectResponse
  15316. * @static
  15317. */
  15318. public static function redirectTo($path, $status = 302, $headers = [], $secure = null)
  15319. {
  15320. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15321. return $instance->redirectTo($path, $status, $headers, $secure);
  15322. }
  15323. /**
  15324. * Create a new redirect response to a named route.
  15325. *
  15326. * @param \BackedEnum|string $route
  15327. * @param mixed $parameters
  15328. * @param int $status
  15329. * @param array $headers
  15330. * @return \Illuminate\Http\RedirectResponse
  15331. * @static
  15332. */
  15333. public static function redirectToRoute($route, $parameters = [], $status = 302, $headers = [])
  15334. {
  15335. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15336. return $instance->redirectToRoute($route, $parameters, $status, $headers);
  15337. }
  15338. /**
  15339. * Create a new redirect response to a controller action.
  15340. *
  15341. * @param array|string $action
  15342. * @param mixed $parameters
  15343. * @param int $status
  15344. * @param array $headers
  15345. * @return \Illuminate\Http\RedirectResponse
  15346. * @static
  15347. */
  15348. public static function redirectToAction($action, $parameters = [], $status = 302, $headers = [])
  15349. {
  15350. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15351. return $instance->redirectToAction($action, $parameters, $status, $headers);
  15352. }
  15353. /**
  15354. * Create a new redirect response, while putting the current URL in the session.
  15355. *
  15356. * @param string $path
  15357. * @param int $status
  15358. * @param array $headers
  15359. * @param bool|null $secure
  15360. * @return \Illuminate\Http\RedirectResponse
  15361. * @static
  15362. */
  15363. public static function redirectGuest($path, $status = 302, $headers = [], $secure = null)
  15364. {
  15365. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15366. return $instance->redirectGuest($path, $status, $headers, $secure);
  15367. }
  15368. /**
  15369. * Create a new redirect response to the previously intended location.
  15370. *
  15371. * @param string $default
  15372. * @param int $status
  15373. * @param array $headers
  15374. * @param bool|null $secure
  15375. * @return \Illuminate\Http\RedirectResponse
  15376. * @static
  15377. */
  15378. public static function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null)
  15379. {
  15380. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15381. return $instance->redirectToIntended($default, $status, $headers, $secure);
  15382. }
  15383. /**
  15384. * Register a custom macro.
  15385. *
  15386. * @param string $name
  15387. * @param object|callable $macro
  15388. * @param-closure-this static $macro
  15389. * @return void
  15390. * @static
  15391. */
  15392. public static function macro($name, $macro)
  15393. {
  15394. \Illuminate\Routing\ResponseFactory::macro($name, $macro);
  15395. }
  15396. /**
  15397. * Mix another object into the class.
  15398. *
  15399. * @param object $mixin
  15400. * @param bool $replace
  15401. * @return void
  15402. * @throws \ReflectionException
  15403. * @static
  15404. */
  15405. public static function mixin($mixin, $replace = true)
  15406. {
  15407. \Illuminate\Routing\ResponseFactory::mixin($mixin, $replace);
  15408. }
  15409. /**
  15410. * Checks if macro is registered.
  15411. *
  15412. * @param string $name
  15413. * @return bool
  15414. * @static
  15415. */
  15416. public static function hasMacro($name)
  15417. {
  15418. return \Illuminate\Routing\ResponseFactory::hasMacro($name);
  15419. }
  15420. /**
  15421. * Flush the existing macros.
  15422. *
  15423. * @return void
  15424. * @static
  15425. */
  15426. public static function flushMacros()
  15427. {
  15428. \Illuminate\Routing\ResponseFactory::flushMacros();
  15429. }
  15430. }
  15431. /**
  15432. * @method static \Illuminate\Routing\RouteRegistrar attribute(string $key, mixed $value)
  15433. * @method static \Illuminate\Routing\RouteRegistrar whereAlpha(array|string $parameters)
  15434. * @method static \Illuminate\Routing\RouteRegistrar whereAlphaNumeric(array|string $parameters)
  15435. * @method static \Illuminate\Routing\RouteRegistrar whereNumber(array|string $parameters)
  15436. * @method static \Illuminate\Routing\RouteRegistrar whereUlid(array|string $parameters)
  15437. * @method static \Illuminate\Routing\RouteRegistrar whereUuid(array|string $parameters)
  15438. * @method static \Illuminate\Routing\RouteRegistrar whereIn(array|string $parameters, array $values)
  15439. * @method static \Illuminate\Routing\RouteRegistrar as(string $value)
  15440. * @method static \Illuminate\Routing\RouteRegistrar can(\UnitEnum|string $ability, array|string $models = [])
  15441. * @method static \Illuminate\Routing\RouteRegistrar controller(string $controller)
  15442. * @method static \Illuminate\Routing\RouteRegistrar domain(\BackedEnum|string $value)
  15443. * @method static \Illuminate\Routing\RouteRegistrar middleware(array|string|null $middleware)
  15444. * @method static \Illuminate\Routing\RouteRegistrar missing(\Closure $missing)
  15445. * @method static \Illuminate\Routing\RouteRegistrar name(\BackedEnum|string $value)
  15446. * @method static \Illuminate\Routing\RouteRegistrar namespace(string|null $value)
  15447. * @method static \Illuminate\Routing\RouteRegistrar prefix(string $prefix)
  15448. * @method static \Illuminate\Routing\RouteRegistrar scopeBindings()
  15449. * @method static \Illuminate\Routing\RouteRegistrar where(array $where)
  15450. * @method static \Illuminate\Routing\RouteRegistrar withoutMiddleware(array|string $middleware)
  15451. * @method static \Illuminate\Routing\RouteRegistrar withoutScopedBindings()
  15452. * @see \Illuminate\Routing\Router
  15453. */
  15454. class Route {
  15455. /**
  15456. * Register a new GET route with the router.
  15457. *
  15458. * @param string $uri
  15459. * @param array|string|callable|null $action
  15460. * @return \Illuminate\Routing\Route
  15461. * @static
  15462. */
  15463. public static function get($uri, $action = null)
  15464. {
  15465. /** @var \Illuminate\Routing\Router $instance */
  15466. return $instance->get($uri, $action);
  15467. }
  15468. /**
  15469. * Register a new POST route with the router.
  15470. *
  15471. * @param string $uri
  15472. * @param array|string|callable|null $action
  15473. * @return \Illuminate\Routing\Route
  15474. * @static
  15475. */
  15476. public static function post($uri, $action = null)
  15477. {
  15478. /** @var \Illuminate\Routing\Router $instance */
  15479. return $instance->post($uri, $action);
  15480. }
  15481. /**
  15482. * Register a new PUT route with the router.
  15483. *
  15484. * @param string $uri
  15485. * @param array|string|callable|null $action
  15486. * @return \Illuminate\Routing\Route
  15487. * @static
  15488. */
  15489. public static function put($uri, $action = null)
  15490. {
  15491. /** @var \Illuminate\Routing\Router $instance */
  15492. return $instance->put($uri, $action);
  15493. }
  15494. /**
  15495. * Register a new PATCH route with the router.
  15496. *
  15497. * @param string $uri
  15498. * @param array|string|callable|null $action
  15499. * @return \Illuminate\Routing\Route
  15500. * @static
  15501. */
  15502. public static function patch($uri, $action = null)
  15503. {
  15504. /** @var \Illuminate\Routing\Router $instance */
  15505. return $instance->patch($uri, $action);
  15506. }
  15507. /**
  15508. * Register a new DELETE route with the router.
  15509. *
  15510. * @param string $uri
  15511. * @param array|string|callable|null $action
  15512. * @return \Illuminate\Routing\Route
  15513. * @static
  15514. */
  15515. public static function delete($uri, $action = null)
  15516. {
  15517. /** @var \Illuminate\Routing\Router $instance */
  15518. return $instance->delete($uri, $action);
  15519. }
  15520. /**
  15521. * Register a new OPTIONS route with the router.
  15522. *
  15523. * @param string $uri
  15524. * @param array|string|callable|null $action
  15525. * @return \Illuminate\Routing\Route
  15526. * @static
  15527. */
  15528. public static function options($uri, $action = null)
  15529. {
  15530. /** @var \Illuminate\Routing\Router $instance */
  15531. return $instance->options($uri, $action);
  15532. }
  15533. /**
  15534. * Register a new route responding to all verbs.
  15535. *
  15536. * @param string $uri
  15537. * @param array|string|callable|null $action
  15538. * @return \Illuminate\Routing\Route
  15539. * @static
  15540. */
  15541. public static function any($uri, $action = null)
  15542. {
  15543. /** @var \Illuminate\Routing\Router $instance */
  15544. return $instance->any($uri, $action);
  15545. }
  15546. /**
  15547. * Register a new fallback route with the router.
  15548. *
  15549. * @param array|string|callable|null $action
  15550. * @return \Illuminate\Routing\Route
  15551. * @static
  15552. */
  15553. public static function fallback($action)
  15554. {
  15555. /** @var \Illuminate\Routing\Router $instance */
  15556. return $instance->fallback($action);
  15557. }
  15558. /**
  15559. * Create a redirect from one URI to another.
  15560. *
  15561. * @param string $uri
  15562. * @param string $destination
  15563. * @param int $status
  15564. * @return \Illuminate\Routing\Route
  15565. * @static
  15566. */
  15567. public static function redirect($uri, $destination, $status = 302)
  15568. {
  15569. /** @var \Illuminate\Routing\Router $instance */
  15570. return $instance->redirect($uri, $destination, $status);
  15571. }
  15572. /**
  15573. * Create a permanent redirect from one URI to another.
  15574. *
  15575. * @param string $uri
  15576. * @param string $destination
  15577. * @return \Illuminate\Routing\Route
  15578. * @static
  15579. */
  15580. public static function permanentRedirect($uri, $destination)
  15581. {
  15582. /** @var \Illuminate\Routing\Router $instance */
  15583. return $instance->permanentRedirect($uri, $destination);
  15584. }
  15585. /**
  15586. * Register a new route that returns a view.
  15587. *
  15588. * @param string $uri
  15589. * @param string $view
  15590. * @param array $data
  15591. * @param int|array $status
  15592. * @param array $headers
  15593. * @return \Illuminate\Routing\Route
  15594. * @static
  15595. */
  15596. public static function view($uri, $view, $data = [], $status = 200, $headers = [])
  15597. {
  15598. /** @var \Illuminate\Routing\Router $instance */
  15599. return $instance->view($uri, $view, $data, $status, $headers);
  15600. }
  15601. /**
  15602. * Register a new route with the given verbs.
  15603. *
  15604. * @param array|string $methods
  15605. * @param string $uri
  15606. * @param array|string|callable|null $action
  15607. * @return \Illuminate\Routing\Route
  15608. * @static
  15609. */
  15610. public static function match($methods, $uri, $action = null)
  15611. {
  15612. /** @var \Illuminate\Routing\Router $instance */
  15613. return $instance->match($methods, $uri, $action);
  15614. }
  15615. /**
  15616. * Register an array of resource controllers.
  15617. *
  15618. * @param array $resources
  15619. * @param array $options
  15620. * @return void
  15621. * @static
  15622. */
  15623. public static function resources($resources, $options = [])
  15624. {
  15625. /** @var \Illuminate\Routing\Router $instance */
  15626. $instance->resources($resources, $options);
  15627. }
  15628. /**
  15629. * Route a resource to a controller.
  15630. *
  15631. * @param string $name
  15632. * @param string $controller
  15633. * @param array $options
  15634. * @return \Illuminate\Routing\PendingResourceRegistration
  15635. * @static
  15636. */
  15637. public static function resource($name, $controller, $options = [])
  15638. {
  15639. /** @var \Illuminate\Routing\Router $instance */
  15640. return $instance->resource($name, $controller, $options);
  15641. }
  15642. /**
  15643. * Register an array of API resource controllers.
  15644. *
  15645. * @param array $resources
  15646. * @param array $options
  15647. * @return void
  15648. * @static
  15649. */
  15650. public static function apiResources($resources, $options = [])
  15651. {
  15652. /** @var \Illuminate\Routing\Router $instance */
  15653. $instance->apiResources($resources, $options);
  15654. }
  15655. /**
  15656. * Route an API resource to a controller.
  15657. *
  15658. * @param string $name
  15659. * @param string $controller
  15660. * @param array $options
  15661. * @return \Illuminate\Routing\PendingResourceRegistration
  15662. * @static
  15663. */
  15664. public static function apiResource($name, $controller, $options = [])
  15665. {
  15666. /** @var \Illuminate\Routing\Router $instance */
  15667. return $instance->apiResource($name, $controller, $options);
  15668. }
  15669. /**
  15670. * Register an array of singleton resource controllers.
  15671. *
  15672. * @param array $singletons
  15673. * @param array $options
  15674. * @return void
  15675. * @static
  15676. */
  15677. public static function singletons($singletons, $options = [])
  15678. {
  15679. /** @var \Illuminate\Routing\Router $instance */
  15680. $instance->singletons($singletons, $options);
  15681. }
  15682. /**
  15683. * Route a singleton resource to a controller.
  15684. *
  15685. * @param string $name
  15686. * @param string $controller
  15687. * @param array $options
  15688. * @return \Illuminate\Routing\PendingSingletonResourceRegistration
  15689. * @static
  15690. */
  15691. public static function singleton($name, $controller, $options = [])
  15692. {
  15693. /** @var \Illuminate\Routing\Router $instance */
  15694. return $instance->singleton($name, $controller, $options);
  15695. }
  15696. /**
  15697. * Register an array of API singleton resource controllers.
  15698. *
  15699. * @param array $singletons
  15700. * @param array $options
  15701. * @return void
  15702. * @static
  15703. */
  15704. public static function apiSingletons($singletons, $options = [])
  15705. {
  15706. /** @var \Illuminate\Routing\Router $instance */
  15707. $instance->apiSingletons($singletons, $options);
  15708. }
  15709. /**
  15710. * Route an API singleton resource to a controller.
  15711. *
  15712. * @param string $name
  15713. * @param string $controller
  15714. * @param array $options
  15715. * @return \Illuminate\Routing\PendingSingletonResourceRegistration
  15716. * @static
  15717. */
  15718. public static function apiSingleton($name, $controller, $options = [])
  15719. {
  15720. /** @var \Illuminate\Routing\Router $instance */
  15721. return $instance->apiSingleton($name, $controller, $options);
  15722. }
  15723. /**
  15724. * Create a route group with shared attributes.
  15725. *
  15726. * @param array $attributes
  15727. * @param \Closure|array|string $routes
  15728. * @return \Illuminate\Routing\Router
  15729. * @static
  15730. */
  15731. public static function group($attributes, $routes)
  15732. {
  15733. /** @var \Illuminate\Routing\Router $instance */
  15734. return $instance->group($attributes, $routes);
  15735. }
  15736. /**
  15737. * Merge the given array with the last group stack.
  15738. *
  15739. * @param array $new
  15740. * @param bool $prependExistingPrefix
  15741. * @return array
  15742. * @static
  15743. */
  15744. public static function mergeWithLastGroup($new, $prependExistingPrefix = true)
  15745. {
  15746. /** @var \Illuminate\Routing\Router $instance */
  15747. return $instance->mergeWithLastGroup($new, $prependExistingPrefix);
  15748. }
  15749. /**
  15750. * Get the prefix from the last group on the stack.
  15751. *
  15752. * @return string
  15753. * @static
  15754. */
  15755. public static function getLastGroupPrefix()
  15756. {
  15757. /** @var \Illuminate\Routing\Router $instance */
  15758. return $instance->getLastGroupPrefix();
  15759. }
  15760. /**
  15761. * Add a route to the underlying route collection.
  15762. *
  15763. * @param array|string $methods
  15764. * @param string $uri
  15765. * @param array|string|callable|null $action
  15766. * @return \Illuminate\Routing\Route
  15767. * @static
  15768. */
  15769. public static function addRoute($methods, $uri, $action)
  15770. {
  15771. /** @var \Illuminate\Routing\Router $instance */
  15772. return $instance->addRoute($methods, $uri, $action);
  15773. }
  15774. /**
  15775. * Create a new Route object.
  15776. *
  15777. * @param array|string $methods
  15778. * @param string $uri
  15779. * @param mixed $action
  15780. * @return \Illuminate\Routing\Route
  15781. * @static
  15782. */
  15783. public static function newRoute($methods, $uri, $action)
  15784. {
  15785. /** @var \Illuminate\Routing\Router $instance */
  15786. return $instance->newRoute($methods, $uri, $action);
  15787. }
  15788. /**
  15789. * Return the response returned by the given route.
  15790. *
  15791. * @param string $name
  15792. * @return \Symfony\Component\HttpFoundation\Response
  15793. * @static
  15794. */
  15795. public static function respondWithRoute($name)
  15796. {
  15797. /** @var \Illuminate\Routing\Router $instance */
  15798. return $instance->respondWithRoute($name);
  15799. }
  15800. /**
  15801. * Dispatch the request to the application.
  15802. *
  15803. * @param \Illuminate\Http\Request $request
  15804. * @return \Symfony\Component\HttpFoundation\Response
  15805. * @static
  15806. */
  15807. public static function dispatch($request)
  15808. {
  15809. /** @var \Illuminate\Routing\Router $instance */
  15810. return $instance->dispatch($request);
  15811. }
  15812. /**
  15813. * Dispatch the request to a route and return the response.
  15814. *
  15815. * @param \Illuminate\Http\Request $request
  15816. * @return \Symfony\Component\HttpFoundation\Response
  15817. * @static
  15818. */
  15819. public static function dispatchToRoute($request)
  15820. {
  15821. /** @var \Illuminate\Routing\Router $instance */
  15822. return $instance->dispatchToRoute($request);
  15823. }
  15824. /**
  15825. * Gather the middleware for the given route with resolved class names.
  15826. *
  15827. * @param \Illuminate\Routing\Route $route
  15828. * @return array
  15829. * @static
  15830. */
  15831. public static function gatherRouteMiddleware($route)
  15832. {
  15833. /** @var \Illuminate\Routing\Router $instance */
  15834. return $instance->gatherRouteMiddleware($route);
  15835. }
  15836. /**
  15837. * Resolve a flat array of middleware classes from the provided array.
  15838. *
  15839. * @param array $middleware
  15840. * @param array $excluded
  15841. * @return array
  15842. * @static
  15843. */
  15844. public static function resolveMiddleware($middleware, $excluded = [])
  15845. {
  15846. /** @var \Illuminate\Routing\Router $instance */
  15847. return $instance->resolveMiddleware($middleware, $excluded);
  15848. }
  15849. /**
  15850. * Create a response instance from the given value.
  15851. *
  15852. * @param \Symfony\Component\HttpFoundation\Request $request
  15853. * @param mixed $response
  15854. * @return \Symfony\Component\HttpFoundation\Response
  15855. * @static
  15856. */
  15857. public static function prepareResponse($request, $response)
  15858. {
  15859. /** @var \Illuminate\Routing\Router $instance */
  15860. return $instance->prepareResponse($request, $response);
  15861. }
  15862. /**
  15863. * Static version of prepareResponse.
  15864. *
  15865. * @param \Symfony\Component\HttpFoundation\Request $request
  15866. * @param mixed $response
  15867. * @return \Symfony\Component\HttpFoundation\Response
  15868. * @static
  15869. */
  15870. public static function toResponse($request, $response)
  15871. {
  15872. return \Illuminate\Routing\Router::toResponse($request, $response);
  15873. }
  15874. /**
  15875. * Substitute the route bindings onto the route.
  15876. *
  15877. * @param \Illuminate\Routing\Route $route
  15878. * @return \Illuminate\Routing\Route
  15879. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model>
  15880. * @throws \Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
  15881. * @static
  15882. */
  15883. public static function substituteBindings($route)
  15884. {
  15885. /** @var \Illuminate\Routing\Router $instance */
  15886. return $instance->substituteBindings($route);
  15887. }
  15888. /**
  15889. * Substitute the implicit route bindings for the given route.
  15890. *
  15891. * @param \Illuminate\Routing\Route $route
  15892. * @return void
  15893. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model>
  15894. * @throws \Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
  15895. * @static
  15896. */
  15897. public static function substituteImplicitBindings($route)
  15898. {
  15899. /** @var \Illuminate\Routing\Router $instance */
  15900. $instance->substituteImplicitBindings($route);
  15901. }
  15902. /**
  15903. * Register a callback to run after implicit bindings are substituted.
  15904. *
  15905. * @param callable $callback
  15906. * @return \Illuminate\Routing\Router
  15907. * @static
  15908. */
  15909. public static function substituteImplicitBindingsUsing($callback)
  15910. {
  15911. /** @var \Illuminate\Routing\Router $instance */
  15912. return $instance->substituteImplicitBindingsUsing($callback);
  15913. }
  15914. /**
  15915. * Register a route matched event listener.
  15916. *
  15917. * @param string|callable $callback
  15918. * @return void
  15919. * @static
  15920. */
  15921. public static function matched($callback)
  15922. {
  15923. /** @var \Illuminate\Routing\Router $instance */
  15924. $instance->matched($callback);
  15925. }
  15926. /**
  15927. * Get all of the defined middleware short-hand names.
  15928. *
  15929. * @return array
  15930. * @static
  15931. */
  15932. public static function getMiddleware()
  15933. {
  15934. /** @var \Illuminate\Routing\Router $instance */
  15935. return $instance->getMiddleware();
  15936. }
  15937. /**
  15938. * Register a short-hand name for a middleware.
  15939. *
  15940. * @param string $name
  15941. * @param string $class
  15942. * @return \Illuminate\Routing\Router
  15943. * @static
  15944. */
  15945. public static function aliasMiddleware($name, $class)
  15946. {
  15947. /** @var \Illuminate\Routing\Router $instance */
  15948. return $instance->aliasMiddleware($name, $class);
  15949. }
  15950. /**
  15951. * Check if a middlewareGroup with the given name exists.
  15952. *
  15953. * @param string $name
  15954. * @return bool
  15955. * @static
  15956. */
  15957. public static function hasMiddlewareGroup($name)
  15958. {
  15959. /** @var \Illuminate\Routing\Router $instance */
  15960. return $instance->hasMiddlewareGroup($name);
  15961. }
  15962. /**
  15963. * Get all of the defined middleware groups.
  15964. *
  15965. * @return array
  15966. * @static
  15967. */
  15968. public static function getMiddlewareGroups()
  15969. {
  15970. /** @var \Illuminate\Routing\Router $instance */
  15971. return $instance->getMiddlewareGroups();
  15972. }
  15973. /**
  15974. * Register a group of middleware.
  15975. *
  15976. * @param string $name
  15977. * @param array $middleware
  15978. * @return \Illuminate\Routing\Router
  15979. * @static
  15980. */
  15981. public static function middlewareGroup($name, $middleware)
  15982. {
  15983. /** @var \Illuminate\Routing\Router $instance */
  15984. return $instance->middlewareGroup($name, $middleware);
  15985. }
  15986. /**
  15987. * Add a middleware to the beginning of a middleware group.
  15988. *
  15989. * If the middleware is already in the group, it will not be added again.
  15990. *
  15991. * @param string $group
  15992. * @param string $middleware
  15993. * @return \Illuminate\Routing\Router
  15994. * @static
  15995. */
  15996. public static function prependMiddlewareToGroup($group, $middleware)
  15997. {
  15998. /** @var \Illuminate\Routing\Router $instance */
  15999. return $instance->prependMiddlewareToGroup($group, $middleware);
  16000. }
  16001. /**
  16002. * Add a middleware to the end of a middleware group.
  16003. *
  16004. * If the middleware is already in the group, it will not be added again.
  16005. *
  16006. * @param string $group
  16007. * @param string $middleware
  16008. * @return \Illuminate\Routing\Router
  16009. * @static
  16010. */
  16011. public static function pushMiddlewareToGroup($group, $middleware)
  16012. {
  16013. /** @var \Illuminate\Routing\Router $instance */
  16014. return $instance->pushMiddlewareToGroup($group, $middleware);
  16015. }
  16016. /**
  16017. * Remove the given middleware from the specified group.
  16018. *
  16019. * @param string $group
  16020. * @param string $middleware
  16021. * @return \Illuminate\Routing\Router
  16022. * @static
  16023. */
  16024. public static function removeMiddlewareFromGroup($group, $middleware)
  16025. {
  16026. /** @var \Illuminate\Routing\Router $instance */
  16027. return $instance->removeMiddlewareFromGroup($group, $middleware);
  16028. }
  16029. /**
  16030. * Flush the router's middleware groups.
  16031. *
  16032. * @return \Illuminate\Routing\Router
  16033. * @static
  16034. */
  16035. public static function flushMiddlewareGroups()
  16036. {
  16037. /** @var \Illuminate\Routing\Router $instance */
  16038. return $instance->flushMiddlewareGroups();
  16039. }
  16040. /**
  16041. * Add a new route parameter binder.
  16042. *
  16043. * @param string $key
  16044. * @param string|callable $binder
  16045. * @return void
  16046. * @static
  16047. */
  16048. public static function bind($key, $binder)
  16049. {
  16050. /** @var \Illuminate\Routing\Router $instance */
  16051. $instance->bind($key, $binder);
  16052. }
  16053. /**
  16054. * Register a model binder for a wildcard.
  16055. *
  16056. * @param string $key
  16057. * @param string $class
  16058. * @param \Closure|null $callback
  16059. * @return void
  16060. * @static
  16061. */
  16062. public static function model($key, $class, $callback = null)
  16063. {
  16064. /** @var \Illuminate\Routing\Router $instance */
  16065. $instance->model($key, $class, $callback);
  16066. }
  16067. /**
  16068. * Get the binding callback for a given binding.
  16069. *
  16070. * @param string $key
  16071. * @return \Closure|null
  16072. * @static
  16073. */
  16074. public static function getBindingCallback($key)
  16075. {
  16076. /** @var \Illuminate\Routing\Router $instance */
  16077. return $instance->getBindingCallback($key);
  16078. }
  16079. /**
  16080. * Get the global "where" patterns.
  16081. *
  16082. * @return array
  16083. * @static
  16084. */
  16085. public static function getPatterns()
  16086. {
  16087. /** @var \Illuminate\Routing\Router $instance */
  16088. return $instance->getPatterns();
  16089. }
  16090. /**
  16091. * Set a global where pattern on all routes.
  16092. *
  16093. * @param string $key
  16094. * @param string $pattern
  16095. * @return void
  16096. * @static
  16097. */
  16098. public static function pattern($key, $pattern)
  16099. {
  16100. /** @var \Illuminate\Routing\Router $instance */
  16101. $instance->pattern($key, $pattern);
  16102. }
  16103. /**
  16104. * Set a group of global where patterns on all routes.
  16105. *
  16106. * @param array $patterns
  16107. * @return void
  16108. * @static
  16109. */
  16110. public static function patterns($patterns)
  16111. {
  16112. /** @var \Illuminate\Routing\Router $instance */
  16113. $instance->patterns($patterns);
  16114. }
  16115. /**
  16116. * Determine if the router currently has a group stack.
  16117. *
  16118. * @return bool
  16119. * @static
  16120. */
  16121. public static function hasGroupStack()
  16122. {
  16123. /** @var \Illuminate\Routing\Router $instance */
  16124. return $instance->hasGroupStack();
  16125. }
  16126. /**
  16127. * Get the current group stack for the router.
  16128. *
  16129. * @return array
  16130. * @static
  16131. */
  16132. public static function getGroupStack()
  16133. {
  16134. /** @var \Illuminate\Routing\Router $instance */
  16135. return $instance->getGroupStack();
  16136. }
  16137. /**
  16138. * Get a route parameter for the current route.
  16139. *
  16140. * @param string $key
  16141. * @param string|null $default
  16142. * @return mixed
  16143. * @static
  16144. */
  16145. public static function input($key, $default = null)
  16146. {
  16147. /** @var \Illuminate\Routing\Router $instance */
  16148. return $instance->input($key, $default);
  16149. }
  16150. /**
  16151. * Get the request currently being dispatched.
  16152. *
  16153. * @return \Illuminate\Http\Request
  16154. * @static
  16155. */
  16156. public static function getCurrentRequest()
  16157. {
  16158. /** @var \Illuminate\Routing\Router $instance */
  16159. return $instance->getCurrentRequest();
  16160. }
  16161. /**
  16162. * Get the currently dispatched route instance.
  16163. *
  16164. * @return \Illuminate\Routing\Route|null
  16165. * @static
  16166. */
  16167. public static function getCurrentRoute()
  16168. {
  16169. /** @var \Illuminate\Routing\Router $instance */
  16170. return $instance->getCurrentRoute();
  16171. }
  16172. /**
  16173. * Get the currently dispatched route instance.
  16174. *
  16175. * @return \Illuminate\Routing\Route|null
  16176. * @static
  16177. */
  16178. public static function current()
  16179. {
  16180. /** @var \Illuminate\Routing\Router $instance */
  16181. return $instance->current();
  16182. }
  16183. /**
  16184. * Check if a route with the given name exists.
  16185. *
  16186. * @param string|array $name
  16187. * @return bool
  16188. * @static
  16189. */
  16190. public static function has($name)
  16191. {
  16192. /** @var \Illuminate\Routing\Router $instance */
  16193. return $instance->has($name);
  16194. }
  16195. /**
  16196. * Get the current route name.
  16197. *
  16198. * @return string|null
  16199. * @static
  16200. */
  16201. public static function currentRouteName()
  16202. {
  16203. /** @var \Illuminate\Routing\Router $instance */
  16204. return $instance->currentRouteName();
  16205. }
  16206. /**
  16207. * Alias for the "currentRouteNamed" method.
  16208. *
  16209. * @param mixed $patterns
  16210. * @return bool
  16211. * @static
  16212. */
  16213. public static function is(...$patterns)
  16214. {
  16215. /** @var \Illuminate\Routing\Router $instance */
  16216. return $instance->is(...$patterns);
  16217. }
  16218. /**
  16219. * Determine if the current route matches a pattern.
  16220. *
  16221. * @param mixed $patterns
  16222. * @return bool
  16223. * @static
  16224. */
  16225. public static function currentRouteNamed(...$patterns)
  16226. {
  16227. /** @var \Illuminate\Routing\Router $instance */
  16228. return $instance->currentRouteNamed(...$patterns);
  16229. }
  16230. /**
  16231. * Get the current route action.
  16232. *
  16233. * @return string|null
  16234. * @static
  16235. */
  16236. public static function currentRouteAction()
  16237. {
  16238. /** @var \Illuminate\Routing\Router $instance */
  16239. return $instance->currentRouteAction();
  16240. }
  16241. /**
  16242. * Alias for the "currentRouteUses" method.
  16243. *
  16244. * @param array|string $patterns
  16245. * @return bool
  16246. * @static
  16247. */
  16248. public static function uses(...$patterns)
  16249. {
  16250. /** @var \Illuminate\Routing\Router $instance */
  16251. return $instance->uses(...$patterns);
  16252. }
  16253. /**
  16254. * Determine if the current route action matches a given action.
  16255. *
  16256. * @param string $action
  16257. * @return bool
  16258. * @static
  16259. */
  16260. public static function currentRouteUses($action)
  16261. {
  16262. /** @var \Illuminate\Routing\Router $instance */
  16263. return $instance->currentRouteUses($action);
  16264. }
  16265. /**
  16266. * Set the unmapped global resource parameters to singular.
  16267. *
  16268. * @param bool $singular
  16269. * @return void
  16270. * @static
  16271. */
  16272. public static function singularResourceParameters($singular = true)
  16273. {
  16274. /** @var \Illuminate\Routing\Router $instance */
  16275. $instance->singularResourceParameters($singular);
  16276. }
  16277. /**
  16278. * Set the global resource parameter mapping.
  16279. *
  16280. * @param array $parameters
  16281. * @return void
  16282. * @static
  16283. */
  16284. public static function resourceParameters($parameters = [])
  16285. {
  16286. /** @var \Illuminate\Routing\Router $instance */
  16287. $instance->resourceParameters($parameters);
  16288. }
  16289. /**
  16290. * Get or set the verbs used in the resource URIs.
  16291. *
  16292. * @param array $verbs
  16293. * @return array|null
  16294. * @static
  16295. */
  16296. public static function resourceVerbs($verbs = [])
  16297. {
  16298. /** @var \Illuminate\Routing\Router $instance */
  16299. return $instance->resourceVerbs($verbs);
  16300. }
  16301. /**
  16302. * Get the underlying route collection.
  16303. *
  16304. * @return \Illuminate\Routing\RouteCollectionInterface
  16305. * @static
  16306. */
  16307. public static function getRoutes()
  16308. {
  16309. /** @var \Illuminate\Routing\Router $instance */
  16310. return $instance->getRoutes();
  16311. }
  16312. /**
  16313. * Set the route collection instance.
  16314. *
  16315. * @param \Illuminate\Routing\RouteCollection $routes
  16316. * @return void
  16317. * @static
  16318. */
  16319. public static function setRoutes($routes)
  16320. {
  16321. /** @var \Illuminate\Routing\Router $instance */
  16322. $instance->setRoutes($routes);
  16323. }
  16324. /**
  16325. * Set the compiled route collection instance.
  16326. *
  16327. * @param array $routes
  16328. * @return void
  16329. * @static
  16330. */
  16331. public static function setCompiledRoutes($routes)
  16332. {
  16333. /** @var \Illuminate\Routing\Router $instance */
  16334. $instance->setCompiledRoutes($routes);
  16335. }
  16336. /**
  16337. * Remove any duplicate middleware from the given array.
  16338. *
  16339. * @param array $middleware
  16340. * @return array
  16341. * @static
  16342. */
  16343. public static function uniqueMiddleware($middleware)
  16344. {
  16345. return \Illuminate\Routing\Router::uniqueMiddleware($middleware);
  16346. }
  16347. /**
  16348. * Set the container instance used by the router.
  16349. *
  16350. * @param \Illuminate\Container\Container $container
  16351. * @return \Illuminate\Routing\Router
  16352. * @static
  16353. */
  16354. public static function setContainer($container)
  16355. {
  16356. /** @var \Illuminate\Routing\Router $instance */
  16357. return $instance->setContainer($container);
  16358. }
  16359. /**
  16360. * Register a custom macro.
  16361. *
  16362. * @param string $name
  16363. * @param object|callable $macro
  16364. * @param-closure-this static $macro
  16365. * @return void
  16366. * @static
  16367. */
  16368. public static function macro($name, $macro)
  16369. {
  16370. \Illuminate\Routing\Router::macro($name, $macro);
  16371. }
  16372. /**
  16373. * Mix another object into the class.
  16374. *
  16375. * @param object $mixin
  16376. * @param bool $replace
  16377. * @return void
  16378. * @throws \ReflectionException
  16379. * @static
  16380. */
  16381. public static function mixin($mixin, $replace = true)
  16382. {
  16383. \Illuminate\Routing\Router::mixin($mixin, $replace);
  16384. }
  16385. /**
  16386. * Checks if macro is registered.
  16387. *
  16388. * @param string $name
  16389. * @return bool
  16390. * @static
  16391. */
  16392. public static function hasMacro($name)
  16393. {
  16394. return \Illuminate\Routing\Router::hasMacro($name);
  16395. }
  16396. /**
  16397. * Flush the existing macros.
  16398. *
  16399. * @return void
  16400. * @static
  16401. */
  16402. public static function flushMacros()
  16403. {
  16404. \Illuminate\Routing\Router::flushMacros();
  16405. }
  16406. /**
  16407. * Dynamically handle calls to the class.
  16408. *
  16409. * @param string $method
  16410. * @param array $parameters
  16411. * @return mixed
  16412. * @throws \BadMethodCallException
  16413. * @static
  16414. */
  16415. public static function macroCall($method, $parameters)
  16416. {
  16417. /** @var \Illuminate\Routing\Router $instance */
  16418. return $instance->macroCall($method, $parameters);
  16419. }
  16420. /**
  16421. * Call the given Closure with this instance then return the instance.
  16422. *
  16423. * @param (callable($this): mixed)|null $callback
  16424. * @return ($callback is null ? \Illuminate\Support\HigherOrderTapProxy : $this)
  16425. * @static
  16426. */
  16427. public static function tap($callback = null)
  16428. {
  16429. /** @var \Illuminate\Routing\Router $instance */
  16430. return $instance->tap($callback);
  16431. }
  16432. }
  16433. /**
  16434. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes withoutOverlapping(int $expiresAt = 1440)
  16435. * @method static void mergeAttributes(\Illuminate\Console\Scheduling\Event $event)
  16436. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes user(string $user)
  16437. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes environments(array|mixed $environments)
  16438. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes evenInMaintenanceMode()
  16439. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes onOneServer()
  16440. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes runInBackground()
  16441. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes when(\Closure|bool $callback)
  16442. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes skip(\Closure|bool $callback)
  16443. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes name(string $description)
  16444. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes description(string $description)
  16445. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes cron(string $expression)
  16446. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes between(string $startTime, string $endTime)
  16447. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes unlessBetween(string $startTime, string $endTime)
  16448. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everySecond()
  16449. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoSeconds()
  16450. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFiveSeconds()
  16451. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTenSeconds()
  16452. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFifteenSeconds()
  16453. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwentySeconds()
  16454. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThirtySeconds()
  16455. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyMinute()
  16456. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoMinutes()
  16457. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThreeMinutes()
  16458. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFourMinutes()
  16459. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFiveMinutes()
  16460. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTenMinutes()
  16461. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFifteenMinutes()
  16462. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThirtyMinutes()
  16463. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes hourly()
  16464. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes hourlyAt(array|string|int|int[] $offset)
  16465. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyOddHour(array|string|int $offset = 0)
  16466. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoHours(array|string|int $offset = 0)
  16467. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThreeHours(array|string|int $offset = 0)
  16468. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFourHours(array|string|int $offset = 0)
  16469. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everySixHours(array|string|int $offset = 0)
  16470. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes daily()
  16471. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes at(string $time)
  16472. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes dailyAt(string $time)
  16473. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceDaily(int $first = 1, int $second = 13)
  16474. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceDailyAt(int $first = 1, int $second = 13, int $offset = 0)
  16475. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekdays()
  16476. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekends()
  16477. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes mondays()
  16478. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes tuesdays()
  16479. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes wednesdays()
  16480. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes thursdays()
  16481. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes fridays()
  16482. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes saturdays()
  16483. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes sundays()
  16484. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekly()
  16485. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weeklyOn(array|mixed $dayOfWeek, string $time = '0:0')
  16486. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes monthly()
  16487. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes monthlyOn(int $dayOfMonth = 1, string $time = '0:0')
  16488. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceMonthly(int $first = 1, int $second = 16, string $time = '0:0')
  16489. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes lastDayOfMonth(string $time = '0:0')
  16490. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes quarterly()
  16491. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes quarterlyOn(int $dayOfQuarter = 1, string $time = '0:0')
  16492. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes yearly()
  16493. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes yearlyOn(int $month = 1, int|string $dayOfMonth = 1, string $time = '0:0')
  16494. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes days(array|mixed $days)
  16495. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes timezone(\DateTimeZone|string $timezone)
  16496. * @see \Illuminate\Console\Scheduling\Schedule
  16497. */
  16498. class Schedule {
  16499. /**
  16500. * Add a new callback event to the schedule.
  16501. *
  16502. * @param string|callable $callback
  16503. * @param array $parameters
  16504. * @return \Illuminate\Console\Scheduling\CallbackEvent
  16505. * @static
  16506. */
  16507. public static function call($callback, $parameters = [])
  16508. {
  16509. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16510. return $instance->call($callback, $parameters);
  16511. }
  16512. /**
  16513. * Add a new Artisan command event to the schedule.
  16514. *
  16515. * @param string $command
  16516. * @param array $parameters
  16517. * @return \Illuminate\Console\Scheduling\Event
  16518. * @static
  16519. */
  16520. public static function command($command, $parameters = [])
  16521. {
  16522. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16523. return $instance->command($command, $parameters);
  16524. }
  16525. /**
  16526. * Add a new job callback event to the schedule.
  16527. *
  16528. * @param object|string $job
  16529. * @param string|null $queue
  16530. * @param string|null $connection
  16531. * @return \Illuminate\Console\Scheduling\CallbackEvent
  16532. * @static
  16533. */
  16534. public static function job($job, $queue = null, $connection = null)
  16535. {
  16536. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16537. return $instance->job($job, $queue, $connection);
  16538. }
  16539. /**
  16540. * Add a new command event to the schedule.
  16541. *
  16542. * @param string $command
  16543. * @param array $parameters
  16544. * @return \Illuminate\Console\Scheduling\Event
  16545. * @static
  16546. */
  16547. public static function exec($command, $parameters = [])
  16548. {
  16549. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16550. return $instance->exec($command, $parameters);
  16551. }
  16552. /**
  16553. * Create new schedule group.
  16554. *
  16555. * @param \Illuminate\Console\Scheduling\Event $event
  16556. * @return void
  16557. * @throws \RuntimeException
  16558. * @static
  16559. */
  16560. public static function group($events)
  16561. {
  16562. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16563. $instance->group($events);
  16564. }
  16565. /**
  16566. * Compile array input for a command.
  16567. *
  16568. * @param string|int $key
  16569. * @param array $value
  16570. * @return string
  16571. * @static
  16572. */
  16573. public static function compileArrayInput($key, $value)
  16574. {
  16575. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16576. return $instance->compileArrayInput($key, $value);
  16577. }
  16578. /**
  16579. * Determine if the server is allowed to run this event.
  16580. *
  16581. * @param \Illuminate\Console\Scheduling\Event $event
  16582. * @param \DateTimeInterface $time
  16583. * @return bool
  16584. * @static
  16585. */
  16586. public static function serverShouldRun($event, $time)
  16587. {
  16588. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16589. return $instance->serverShouldRun($event, $time);
  16590. }
  16591. /**
  16592. * Get all of the events on the schedule that are due.
  16593. *
  16594. * @param \Illuminate\Contracts\Foundation\Application $app
  16595. * @return \Illuminate\Support\Collection
  16596. * @static
  16597. */
  16598. public static function dueEvents($app)
  16599. {
  16600. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16601. return $instance->dueEvents($app);
  16602. }
  16603. /**
  16604. * Get all of the events on the schedule.
  16605. *
  16606. * @return \Illuminate\Console\Scheduling\Event[]
  16607. * @static
  16608. */
  16609. public static function events()
  16610. {
  16611. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16612. return $instance->events();
  16613. }
  16614. /**
  16615. * Specify the cache store that should be used to store mutexes.
  16616. *
  16617. * @param string $store
  16618. * @return \Illuminate\Console\Scheduling\Schedule
  16619. * @static
  16620. */
  16621. public static function useCache($store)
  16622. {
  16623. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16624. return $instance->useCache($store);
  16625. }
  16626. /**
  16627. * Register a custom macro.
  16628. *
  16629. * @param string $name
  16630. * @param object|callable $macro
  16631. * @param-closure-this static $macro
  16632. * @return void
  16633. * @static
  16634. */
  16635. public static function macro($name, $macro)
  16636. {
  16637. \Illuminate\Console\Scheduling\Schedule::macro($name, $macro);
  16638. }
  16639. /**
  16640. * Mix another object into the class.
  16641. *
  16642. * @param object $mixin
  16643. * @param bool $replace
  16644. * @return void
  16645. * @throws \ReflectionException
  16646. * @static
  16647. */
  16648. public static function mixin($mixin, $replace = true)
  16649. {
  16650. \Illuminate\Console\Scheduling\Schedule::mixin($mixin, $replace);
  16651. }
  16652. /**
  16653. * Checks if macro is registered.
  16654. *
  16655. * @param string $name
  16656. * @return bool
  16657. * @static
  16658. */
  16659. public static function hasMacro($name)
  16660. {
  16661. return \Illuminate\Console\Scheduling\Schedule::hasMacro($name);
  16662. }
  16663. /**
  16664. * Flush the existing macros.
  16665. *
  16666. * @return void
  16667. * @static
  16668. */
  16669. public static function flushMacros()
  16670. {
  16671. \Illuminate\Console\Scheduling\Schedule::flushMacros();
  16672. }
  16673. /**
  16674. * Dynamically handle calls to the class.
  16675. *
  16676. * @param string $method
  16677. * @param array $parameters
  16678. * @return mixed
  16679. * @throws \BadMethodCallException
  16680. * @static
  16681. */
  16682. public static function macroCall($method, $parameters)
  16683. {
  16684. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16685. return $instance->macroCall($method, $parameters);
  16686. }
  16687. }
  16688. /**
  16689. * @see \Illuminate\Database\Schema\Builder
  16690. */
  16691. class Schema {
  16692. /**
  16693. * Drop all tables from the database.
  16694. *
  16695. * @return void
  16696. * @static
  16697. */
  16698. public static function dropAllTables()
  16699. {
  16700. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16701. $instance->dropAllTables();
  16702. }
  16703. /**
  16704. * Drop all views from the database.
  16705. *
  16706. * @return void
  16707. * @static
  16708. */
  16709. public static function dropAllViews()
  16710. {
  16711. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16712. $instance->dropAllViews();
  16713. }
  16714. /**
  16715. * Drop all types from the database.
  16716. *
  16717. * @return void
  16718. * @static
  16719. */
  16720. public static function dropAllTypes()
  16721. {
  16722. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16723. $instance->dropAllTypes();
  16724. }
  16725. /**
  16726. * Get the current schemas for the connection.
  16727. *
  16728. * @return string[]
  16729. * @static
  16730. */
  16731. public static function getCurrentSchemaListing()
  16732. {
  16733. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16734. return $instance->getCurrentSchemaListing();
  16735. }
  16736. /**
  16737. * Set the default string length for migrations.
  16738. *
  16739. * @param int $length
  16740. * @return void
  16741. * @static
  16742. */
  16743. public static function defaultStringLength($length)
  16744. {
  16745. //Method inherited from \Illuminate\Database\Schema\Builder
  16746. \Illuminate\Database\Schema\PostgresBuilder::defaultStringLength($length);
  16747. }
  16748. /**
  16749. * Set the default time precision for migrations.
  16750. *
  16751. * @static
  16752. */
  16753. public static function defaultTimePrecision($precision)
  16754. {
  16755. //Method inherited from \Illuminate\Database\Schema\Builder
  16756. return \Illuminate\Database\Schema\PostgresBuilder::defaultTimePrecision($precision);
  16757. }
  16758. /**
  16759. * Set the default morph key type for migrations.
  16760. *
  16761. * @param string $type
  16762. * @return void
  16763. * @throws \InvalidArgumentException
  16764. * @static
  16765. */
  16766. public static function defaultMorphKeyType($type)
  16767. {
  16768. //Method inherited from \Illuminate\Database\Schema\Builder
  16769. \Illuminate\Database\Schema\PostgresBuilder::defaultMorphKeyType($type);
  16770. }
  16771. /**
  16772. * Set the default morph key type for migrations to UUIDs.
  16773. *
  16774. * @return void
  16775. * @static
  16776. */
  16777. public static function morphUsingUuids()
  16778. {
  16779. //Method inherited from \Illuminate\Database\Schema\Builder
  16780. \Illuminate\Database\Schema\PostgresBuilder::morphUsingUuids();
  16781. }
  16782. /**
  16783. * Set the default morph key type for migrations to ULIDs.
  16784. *
  16785. * @return void
  16786. * @static
  16787. */
  16788. public static function morphUsingUlids()
  16789. {
  16790. //Method inherited from \Illuminate\Database\Schema\Builder
  16791. \Illuminate\Database\Schema\PostgresBuilder::morphUsingUlids();
  16792. }
  16793. /**
  16794. * Create a database in the schema.
  16795. *
  16796. * @param string $name
  16797. * @return bool
  16798. * @static
  16799. */
  16800. public static function createDatabase($name)
  16801. {
  16802. //Method inherited from \Illuminate\Database\Schema\Builder
  16803. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16804. return $instance->createDatabase($name);
  16805. }
  16806. /**
  16807. * Drop a database from the schema if the database exists.
  16808. *
  16809. * @param string $name
  16810. * @return bool
  16811. * @static
  16812. */
  16813. public static function dropDatabaseIfExists($name)
  16814. {
  16815. //Method inherited from \Illuminate\Database\Schema\Builder
  16816. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16817. return $instance->dropDatabaseIfExists($name);
  16818. }
  16819. /**
  16820. * Get the schemas that belong to the connection.
  16821. *
  16822. * @return \Illuminate\Database\Schema\list<array{name: string, path: string|null, default: bool}>
  16823. * @static
  16824. */
  16825. public static function getSchemas()
  16826. {
  16827. //Method inherited from \Illuminate\Database\Schema\Builder
  16828. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16829. return $instance->getSchemas();
  16830. }
  16831. /**
  16832. * Determine if the given table exists.
  16833. *
  16834. * @param string $table
  16835. * @return bool
  16836. * @static
  16837. */
  16838. public static function hasTable($table)
  16839. {
  16840. //Method inherited from \Illuminate\Database\Schema\Builder
  16841. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16842. return $instance->hasTable($table);
  16843. }
  16844. /**
  16845. * Determine if the given view exists.
  16846. *
  16847. * @param string $view
  16848. * @return bool
  16849. * @static
  16850. */
  16851. public static function hasView($view)
  16852. {
  16853. //Method inherited from \Illuminate\Database\Schema\Builder
  16854. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16855. return $instance->hasView($view);
  16856. }
  16857. /**
  16858. * Get the tables that belong to the connection.
  16859. *
  16860. * @param string|string[]|null $schema
  16861. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string|null, schema_qualified_name: string, size: int|null, comment: string|null, collation: string|null, engine: string|null}>
  16862. * @static
  16863. */
  16864. public static function getTables($schema = null)
  16865. {
  16866. //Method inherited from \Illuminate\Database\Schema\Builder
  16867. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16868. return $instance->getTables($schema);
  16869. }
  16870. /**
  16871. * Get the names of the tables that belong to the connection.
  16872. *
  16873. * @param string|string[]|null $schema
  16874. * @param bool $schemaQualified
  16875. * @return list<string>
  16876. * @static
  16877. */
  16878. public static function getTableListing($schema = null, $schemaQualified = true)
  16879. {
  16880. //Method inherited from \Illuminate\Database\Schema\Builder
  16881. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16882. return $instance->getTableListing($schema, $schemaQualified);
  16883. }
  16884. /**
  16885. * Get the views that belong to the connection.
  16886. *
  16887. * @param string|string[]|null $schema
  16888. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string|null, schema_qualified_name: string, definition: string}>
  16889. * @static
  16890. */
  16891. public static function getViews($schema = null)
  16892. {
  16893. //Method inherited from \Illuminate\Database\Schema\Builder
  16894. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16895. return $instance->getViews($schema);
  16896. }
  16897. /**
  16898. * Get the user-defined types that belong to the connection.
  16899. *
  16900. * @param string|string[]|null $schema
  16901. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string, type: string, type: string, category: string, implicit: bool}>
  16902. * @static
  16903. */
  16904. public static function getTypes($schema = null)
  16905. {
  16906. //Method inherited from \Illuminate\Database\Schema\Builder
  16907. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16908. return $instance->getTypes($schema);
  16909. }
  16910. /**
  16911. * Determine if the given table has a given column.
  16912. *
  16913. * @param string $table
  16914. * @param string $column
  16915. * @return bool
  16916. * @static
  16917. */
  16918. public static function hasColumn($table, $column)
  16919. {
  16920. //Method inherited from \Illuminate\Database\Schema\Builder
  16921. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16922. return $instance->hasColumn($table, $column);
  16923. }
  16924. /**
  16925. * Determine if the given table has given columns.
  16926. *
  16927. * @param string $table
  16928. * @param array<string> $columns
  16929. * @return bool
  16930. * @static
  16931. */
  16932. public static function hasColumns($table, $columns)
  16933. {
  16934. //Method inherited from \Illuminate\Database\Schema\Builder
  16935. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16936. return $instance->hasColumns($table, $columns);
  16937. }
  16938. /**
  16939. * Execute a table builder callback if the given table has a given column.
  16940. *
  16941. * @param string $table
  16942. * @param string $column
  16943. * @param \Closure $callback
  16944. * @return void
  16945. * @static
  16946. */
  16947. public static function whenTableHasColumn($table, $column, $callback)
  16948. {
  16949. //Method inherited from \Illuminate\Database\Schema\Builder
  16950. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16951. $instance->whenTableHasColumn($table, $column, $callback);
  16952. }
  16953. /**
  16954. * Execute a table builder callback if the given table doesn't have a given column.
  16955. *
  16956. * @param string $table
  16957. * @param string $column
  16958. * @param \Closure $callback
  16959. * @return void
  16960. * @static
  16961. */
  16962. public static function whenTableDoesntHaveColumn($table, $column, $callback)
  16963. {
  16964. //Method inherited from \Illuminate\Database\Schema\Builder
  16965. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16966. $instance->whenTableDoesntHaveColumn($table, $column, $callback);
  16967. }
  16968. /**
  16969. * Get the data type for the given column name.
  16970. *
  16971. * @param string $table
  16972. * @param string $column
  16973. * @param bool $fullDefinition
  16974. * @return string
  16975. * @static
  16976. */
  16977. public static function getColumnType($table, $column, $fullDefinition = false)
  16978. {
  16979. //Method inherited from \Illuminate\Database\Schema\Builder
  16980. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16981. return $instance->getColumnType($table, $column, $fullDefinition);
  16982. }
  16983. /**
  16984. * Get the column listing for a given table.
  16985. *
  16986. * @param string $table
  16987. * @return list<string>
  16988. * @static
  16989. */
  16990. public static function getColumnListing($table)
  16991. {
  16992. //Method inherited from \Illuminate\Database\Schema\Builder
  16993. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16994. return $instance->getColumnListing($table);
  16995. }
  16996. /**
  16997. * Get the columns for a given table.
  16998. *
  16999. * @param string $table
  17000. * @return \Illuminate\Database\Schema\list<array{name: string, type: string, type_name: string, nullable: bool, default: mixed, auto_increment: bool, comment: string|null, generation: array{type: string, expression: string|null}|null}>
  17001. * @static
  17002. */
  17003. public static function getColumns($table)
  17004. {
  17005. //Method inherited from \Illuminate\Database\Schema\Builder
  17006. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17007. return $instance->getColumns($table);
  17008. }
  17009. /**
  17010. * Get the indexes for a given table.
  17011. *
  17012. * @param string $table
  17013. * @return \Illuminate\Database\Schema\list<array{name: string, columns: list<string>, type: string, unique: bool, primary: bool}>
  17014. * @static
  17015. */
  17016. public static function getIndexes($table)
  17017. {
  17018. //Method inherited from \Illuminate\Database\Schema\Builder
  17019. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17020. return $instance->getIndexes($table);
  17021. }
  17022. /**
  17023. * Get the names of the indexes for a given table.
  17024. *
  17025. * @param string $table
  17026. * @return list<string>
  17027. * @static
  17028. */
  17029. public static function getIndexListing($table)
  17030. {
  17031. //Method inherited from \Illuminate\Database\Schema\Builder
  17032. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17033. return $instance->getIndexListing($table);
  17034. }
  17035. /**
  17036. * Determine if the given table has a given index.
  17037. *
  17038. * @param string $table
  17039. * @param string|array $index
  17040. * @param string|null $type
  17041. * @return bool
  17042. * @static
  17043. */
  17044. public static function hasIndex($table, $index, $type = null)
  17045. {
  17046. //Method inherited from \Illuminate\Database\Schema\Builder
  17047. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17048. return $instance->hasIndex($table, $index, $type);
  17049. }
  17050. /**
  17051. * Get the foreign keys for a given table.
  17052. *
  17053. * @param string $table
  17054. * @return array
  17055. * @static
  17056. */
  17057. public static function getForeignKeys($table)
  17058. {
  17059. //Method inherited from \Illuminate\Database\Schema\Builder
  17060. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17061. return $instance->getForeignKeys($table);
  17062. }
  17063. /**
  17064. * Modify a table on the schema.
  17065. *
  17066. * @param string $table
  17067. * @param \Closure $callback
  17068. * @return void
  17069. * @static
  17070. */
  17071. public static function table($table, $callback)
  17072. {
  17073. //Method inherited from \Illuminate\Database\Schema\Builder
  17074. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17075. $instance->table($table, $callback);
  17076. }
  17077. /**
  17078. * Create a new table on the schema.
  17079. *
  17080. * @param string $table
  17081. * @param \Closure $callback
  17082. * @return void
  17083. * @static
  17084. */
  17085. public static function create($table, $callback)
  17086. {
  17087. //Method inherited from \Illuminate\Database\Schema\Builder
  17088. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17089. $instance->create($table, $callback);
  17090. }
  17091. /**
  17092. * Drop a table from the schema.
  17093. *
  17094. * @param string $table
  17095. * @return void
  17096. * @static
  17097. */
  17098. public static function drop($table)
  17099. {
  17100. //Method inherited from \Illuminate\Database\Schema\Builder
  17101. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17102. $instance->drop($table);
  17103. }
  17104. /**
  17105. * Drop a table from the schema if it exists.
  17106. *
  17107. * @param string $table
  17108. * @return void
  17109. * @static
  17110. */
  17111. public static function dropIfExists($table)
  17112. {
  17113. //Method inherited from \Illuminate\Database\Schema\Builder
  17114. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17115. $instance->dropIfExists($table);
  17116. }
  17117. /**
  17118. * Drop columns from a table schema.
  17119. *
  17120. * @param string $table
  17121. * @param string|array<string> $columns
  17122. * @return void
  17123. * @static
  17124. */
  17125. public static function dropColumns($table, $columns)
  17126. {
  17127. //Method inherited from \Illuminate\Database\Schema\Builder
  17128. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17129. $instance->dropColumns($table, $columns);
  17130. }
  17131. /**
  17132. * Rename a table on the schema.
  17133. *
  17134. * @param string $from
  17135. * @param string $to
  17136. * @return void
  17137. * @static
  17138. */
  17139. public static function rename($from, $to)
  17140. {
  17141. //Method inherited from \Illuminate\Database\Schema\Builder
  17142. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17143. $instance->rename($from, $to);
  17144. }
  17145. /**
  17146. * Enable foreign key constraints.
  17147. *
  17148. * @return bool
  17149. * @static
  17150. */
  17151. public static function enableForeignKeyConstraints()
  17152. {
  17153. //Method inherited from \Illuminate\Database\Schema\Builder
  17154. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17155. return $instance->enableForeignKeyConstraints();
  17156. }
  17157. /**
  17158. * Disable foreign key constraints.
  17159. *
  17160. * @return bool
  17161. * @static
  17162. */
  17163. public static function disableForeignKeyConstraints()
  17164. {
  17165. //Method inherited from \Illuminate\Database\Schema\Builder
  17166. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17167. return $instance->disableForeignKeyConstraints();
  17168. }
  17169. /**
  17170. * Disable foreign key constraints during the execution of a callback.
  17171. *
  17172. * @param \Closure $callback
  17173. * @return mixed
  17174. * @static
  17175. */
  17176. public static function withoutForeignKeyConstraints($callback)
  17177. {
  17178. //Method inherited from \Illuminate\Database\Schema\Builder
  17179. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17180. return $instance->withoutForeignKeyConstraints($callback);
  17181. }
  17182. /**
  17183. * Get the default schema name for the connection.
  17184. *
  17185. * @return string|null
  17186. * @static
  17187. */
  17188. public static function getCurrentSchemaName()
  17189. {
  17190. //Method inherited from \Illuminate\Database\Schema\Builder
  17191. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17192. return $instance->getCurrentSchemaName();
  17193. }
  17194. /**
  17195. * Parse the given database object reference and extract the schema and table.
  17196. *
  17197. * @param string $reference
  17198. * @param string|bool|null $withDefaultSchema
  17199. * @return array
  17200. * @static
  17201. */
  17202. public static function parseSchemaAndTable($reference, $withDefaultSchema = null)
  17203. {
  17204. //Method inherited from \Illuminate\Database\Schema\Builder
  17205. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17206. return $instance->parseSchemaAndTable($reference, $withDefaultSchema);
  17207. }
  17208. /**
  17209. * Get the database connection instance.
  17210. *
  17211. * @return \Illuminate\Database\Connection
  17212. * @static
  17213. */
  17214. public static function getConnection()
  17215. {
  17216. //Method inherited from \Illuminate\Database\Schema\Builder
  17217. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17218. return $instance->getConnection();
  17219. }
  17220. /**
  17221. * Set the Schema Blueprint resolver callback.
  17222. *
  17223. * @param \Closure(string, \Closure, string): \Illuminate\Database\Schema\Blueprint|null $resolver
  17224. * @return void
  17225. * @static
  17226. */
  17227. public static function blueprintResolver($resolver)
  17228. {
  17229. //Method inherited from \Illuminate\Database\Schema\Builder
  17230. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17231. $instance->blueprintResolver($resolver);
  17232. }
  17233. /**
  17234. * Register a custom macro.
  17235. *
  17236. * @param string $name
  17237. * @param object|callable $macro
  17238. * @param-closure-this static $macro
  17239. * @return void
  17240. * @static
  17241. */
  17242. public static function macro($name, $macro)
  17243. {
  17244. //Method inherited from \Illuminate\Database\Schema\Builder
  17245. \Illuminate\Database\Schema\PostgresBuilder::macro($name, $macro);
  17246. }
  17247. /**
  17248. * Mix another object into the class.
  17249. *
  17250. * @param object $mixin
  17251. * @param bool $replace
  17252. * @return void
  17253. * @throws \ReflectionException
  17254. * @static
  17255. */
  17256. public static function mixin($mixin, $replace = true)
  17257. {
  17258. //Method inherited from \Illuminate\Database\Schema\Builder
  17259. \Illuminate\Database\Schema\PostgresBuilder::mixin($mixin, $replace);
  17260. }
  17261. /**
  17262. * Checks if macro is registered.
  17263. *
  17264. * @param string $name
  17265. * @return bool
  17266. * @static
  17267. */
  17268. public static function hasMacro($name)
  17269. {
  17270. //Method inherited from \Illuminate\Database\Schema\Builder
  17271. return \Illuminate\Database\Schema\PostgresBuilder::hasMacro($name);
  17272. }
  17273. /**
  17274. * Flush the existing macros.
  17275. *
  17276. * @return void
  17277. * @static
  17278. */
  17279. public static function flushMacros()
  17280. {
  17281. //Method inherited from \Illuminate\Database\Schema\Builder
  17282. \Illuminate\Database\Schema\PostgresBuilder::flushMacros();
  17283. }
  17284. }
  17285. /**
  17286. * @see \Illuminate\Session\SessionManager
  17287. */
  17288. class Session {
  17289. /**
  17290. * Determine if requests for the same session should wait for each to finish before executing.
  17291. *
  17292. * @return bool
  17293. * @static
  17294. */
  17295. public static function shouldBlock()
  17296. {
  17297. /** @var \Illuminate\Session\SessionManager $instance */
  17298. return $instance->shouldBlock();
  17299. }
  17300. /**
  17301. * Get the name of the cache store / driver that should be used to acquire session locks.
  17302. *
  17303. * @return string|null
  17304. * @static
  17305. */
  17306. public static function blockDriver()
  17307. {
  17308. /** @var \Illuminate\Session\SessionManager $instance */
  17309. return $instance->blockDriver();
  17310. }
  17311. /**
  17312. * Get the maximum number of seconds the session lock should be held for.
  17313. *
  17314. * @return int
  17315. * @static
  17316. */
  17317. public static function defaultRouteBlockLockSeconds()
  17318. {
  17319. /** @var \Illuminate\Session\SessionManager $instance */
  17320. return $instance->defaultRouteBlockLockSeconds();
  17321. }
  17322. /**
  17323. * Get the maximum number of seconds to wait while attempting to acquire a route block session lock.
  17324. *
  17325. * @return int
  17326. * @static
  17327. */
  17328. public static function defaultRouteBlockWaitSeconds()
  17329. {
  17330. /** @var \Illuminate\Session\SessionManager $instance */
  17331. return $instance->defaultRouteBlockWaitSeconds();
  17332. }
  17333. /**
  17334. * Get the session configuration.
  17335. *
  17336. * @return array
  17337. * @static
  17338. */
  17339. public static function getSessionConfig()
  17340. {
  17341. /** @var \Illuminate\Session\SessionManager $instance */
  17342. return $instance->getSessionConfig();
  17343. }
  17344. /**
  17345. * Get the default session driver name.
  17346. *
  17347. * @return string
  17348. * @static
  17349. */
  17350. public static function getDefaultDriver()
  17351. {
  17352. /** @var \Illuminate\Session\SessionManager $instance */
  17353. return $instance->getDefaultDriver();
  17354. }
  17355. /**
  17356. * Set the default session driver name.
  17357. *
  17358. * @param string $name
  17359. * @return void
  17360. * @static
  17361. */
  17362. public static function setDefaultDriver($name)
  17363. {
  17364. /** @var \Illuminate\Session\SessionManager $instance */
  17365. $instance->setDefaultDriver($name);
  17366. }
  17367. /**
  17368. * Get a driver instance.
  17369. *
  17370. * @param string|null $driver
  17371. * @return mixed
  17372. * @throws \InvalidArgumentException
  17373. * @static
  17374. */
  17375. public static function driver($driver = null)
  17376. {
  17377. //Method inherited from \Illuminate\Support\Manager
  17378. /** @var \Illuminate\Session\SessionManager $instance */
  17379. return $instance->driver($driver);
  17380. }
  17381. /**
  17382. * Register a custom driver creator Closure.
  17383. *
  17384. * @param string $driver
  17385. * @param \Closure $callback
  17386. * @return \Illuminate\Session\SessionManager
  17387. * @static
  17388. */
  17389. public static function extend($driver, $callback)
  17390. {
  17391. //Method inherited from \Illuminate\Support\Manager
  17392. /** @var \Illuminate\Session\SessionManager $instance */
  17393. return $instance->extend($driver, $callback);
  17394. }
  17395. /**
  17396. * Get all of the created "drivers".
  17397. *
  17398. * @return array
  17399. * @static
  17400. */
  17401. public static function getDrivers()
  17402. {
  17403. //Method inherited from \Illuminate\Support\Manager
  17404. /** @var \Illuminate\Session\SessionManager $instance */
  17405. return $instance->getDrivers();
  17406. }
  17407. /**
  17408. * Get the container instance used by the manager.
  17409. *
  17410. * @return \Illuminate\Contracts\Container\Container
  17411. * @static
  17412. */
  17413. public static function getContainer()
  17414. {
  17415. //Method inherited from \Illuminate\Support\Manager
  17416. /** @var \Illuminate\Session\SessionManager $instance */
  17417. return $instance->getContainer();
  17418. }
  17419. /**
  17420. * Set the container instance used by the manager.
  17421. *
  17422. * @param \Illuminate\Contracts\Container\Container $container
  17423. * @return \Illuminate\Session\SessionManager
  17424. * @static
  17425. */
  17426. public static function setContainer($container)
  17427. {
  17428. //Method inherited from \Illuminate\Support\Manager
  17429. /** @var \Illuminate\Session\SessionManager $instance */
  17430. return $instance->setContainer($container);
  17431. }
  17432. /**
  17433. * Forget all of the resolved driver instances.
  17434. *
  17435. * @return \Illuminate\Session\SessionManager
  17436. * @static
  17437. */
  17438. public static function forgetDrivers()
  17439. {
  17440. //Method inherited from \Illuminate\Support\Manager
  17441. /** @var \Illuminate\Session\SessionManager $instance */
  17442. return $instance->forgetDrivers();
  17443. }
  17444. /**
  17445. * Start the session, reading the data from a handler.
  17446. *
  17447. * @return bool
  17448. * @static
  17449. */
  17450. public static function start()
  17451. {
  17452. /** @var \Illuminate\Session\Store $instance */
  17453. return $instance->start();
  17454. }
  17455. /**
  17456. * Save the session data to storage.
  17457. *
  17458. * @return void
  17459. * @static
  17460. */
  17461. public static function save()
  17462. {
  17463. /** @var \Illuminate\Session\Store $instance */
  17464. $instance->save();
  17465. }
  17466. /**
  17467. * Age the flash data for the session.
  17468. *
  17469. * @return void
  17470. * @static
  17471. */
  17472. public static function ageFlashData()
  17473. {
  17474. /** @var \Illuminate\Session\Store $instance */
  17475. $instance->ageFlashData();
  17476. }
  17477. /**
  17478. * Get all of the session data.
  17479. *
  17480. * @return array
  17481. * @static
  17482. */
  17483. public static function all()
  17484. {
  17485. /** @var \Illuminate\Session\Store $instance */
  17486. return $instance->all();
  17487. }
  17488. /**
  17489. * Get a subset of the session data.
  17490. *
  17491. * @param array $keys
  17492. * @return array
  17493. * @static
  17494. */
  17495. public static function only($keys)
  17496. {
  17497. /** @var \Illuminate\Session\Store $instance */
  17498. return $instance->only($keys);
  17499. }
  17500. /**
  17501. * Get all the session data except for a specified array of items.
  17502. *
  17503. * @param array $keys
  17504. * @return array
  17505. * @static
  17506. */
  17507. public static function except($keys)
  17508. {
  17509. /** @var \Illuminate\Session\Store $instance */
  17510. return $instance->except($keys);
  17511. }
  17512. /**
  17513. * Checks if a key exists.
  17514. *
  17515. * @param string|array $key
  17516. * @return bool
  17517. * @static
  17518. */
  17519. public static function exists($key)
  17520. {
  17521. /** @var \Illuminate\Session\Store $instance */
  17522. return $instance->exists($key);
  17523. }
  17524. /**
  17525. * Determine if the given key is missing from the session data.
  17526. *
  17527. * @param string|array $key
  17528. * @return bool
  17529. * @static
  17530. */
  17531. public static function missing($key)
  17532. {
  17533. /** @var \Illuminate\Session\Store $instance */
  17534. return $instance->missing($key);
  17535. }
  17536. /**
  17537. * Determine if a key is present and not null.
  17538. *
  17539. * @param string|array $key
  17540. * @return bool
  17541. * @static
  17542. */
  17543. public static function has($key)
  17544. {
  17545. /** @var \Illuminate\Session\Store $instance */
  17546. return $instance->has($key);
  17547. }
  17548. /**
  17549. * Determine if any of the given keys are present and not null.
  17550. *
  17551. * @param string|array $key
  17552. * @return bool
  17553. * @static
  17554. */
  17555. public static function hasAny($key)
  17556. {
  17557. /** @var \Illuminate\Session\Store $instance */
  17558. return $instance->hasAny($key);
  17559. }
  17560. /**
  17561. * Get an item from the session.
  17562. *
  17563. * @param string $key
  17564. * @param mixed $default
  17565. * @return mixed
  17566. * @static
  17567. */
  17568. public static function get($key, $default = null)
  17569. {
  17570. /** @var \Illuminate\Session\Store $instance */
  17571. return $instance->get($key, $default);
  17572. }
  17573. /**
  17574. * Get the value of a given key and then forget it.
  17575. *
  17576. * @param string $key
  17577. * @param mixed $default
  17578. * @return mixed
  17579. * @static
  17580. */
  17581. public static function pull($key, $default = null)
  17582. {
  17583. /** @var \Illuminate\Session\Store $instance */
  17584. return $instance->pull($key, $default);
  17585. }
  17586. /**
  17587. * Determine if the session contains old input.
  17588. *
  17589. * @param string|null $key
  17590. * @return bool
  17591. * @static
  17592. */
  17593. public static function hasOldInput($key = null)
  17594. {
  17595. /** @var \Illuminate\Session\Store $instance */
  17596. return $instance->hasOldInput($key);
  17597. }
  17598. /**
  17599. * Get the requested item from the flashed input array.
  17600. *
  17601. * @param string|null $key
  17602. * @param mixed $default
  17603. * @return mixed
  17604. * @static
  17605. */
  17606. public static function getOldInput($key = null, $default = null)
  17607. {
  17608. /** @var \Illuminate\Session\Store $instance */
  17609. return $instance->getOldInput($key, $default);
  17610. }
  17611. /**
  17612. * Replace the given session attributes entirely.
  17613. *
  17614. * @param array $attributes
  17615. * @return void
  17616. * @static
  17617. */
  17618. public static function replace($attributes)
  17619. {
  17620. /** @var \Illuminate\Session\Store $instance */
  17621. $instance->replace($attributes);
  17622. }
  17623. /**
  17624. * Put a key / value pair or array of key / value pairs in the session.
  17625. *
  17626. * @param string|array $key
  17627. * @param mixed $value
  17628. * @return void
  17629. * @static
  17630. */
  17631. public static function put($key, $value = null)
  17632. {
  17633. /** @var \Illuminate\Session\Store $instance */
  17634. $instance->put($key, $value);
  17635. }
  17636. /**
  17637. * Get an item from the session, or store the default value.
  17638. *
  17639. * @param string $key
  17640. * @param \Closure $callback
  17641. * @return mixed
  17642. * @static
  17643. */
  17644. public static function remember($key, $callback)
  17645. {
  17646. /** @var \Illuminate\Session\Store $instance */
  17647. return $instance->remember($key, $callback);
  17648. }
  17649. /**
  17650. * Push a value onto a session array.
  17651. *
  17652. * @param string $key
  17653. * @param mixed $value
  17654. * @return void
  17655. * @static
  17656. */
  17657. public static function push($key, $value)
  17658. {
  17659. /** @var \Illuminate\Session\Store $instance */
  17660. $instance->push($key, $value);
  17661. }
  17662. /**
  17663. * Increment the value of an item in the session.
  17664. *
  17665. * @param string $key
  17666. * @param int $amount
  17667. * @return mixed
  17668. * @static
  17669. */
  17670. public static function increment($key, $amount = 1)
  17671. {
  17672. /** @var \Illuminate\Session\Store $instance */
  17673. return $instance->increment($key, $amount);
  17674. }
  17675. /**
  17676. * Decrement the value of an item in the session.
  17677. *
  17678. * @param string $key
  17679. * @param int $amount
  17680. * @return int
  17681. * @static
  17682. */
  17683. public static function decrement($key, $amount = 1)
  17684. {
  17685. /** @var \Illuminate\Session\Store $instance */
  17686. return $instance->decrement($key, $amount);
  17687. }
  17688. /**
  17689. * Flash a key / value pair to the session.
  17690. *
  17691. * @param string $key
  17692. * @param mixed $value
  17693. * @return void
  17694. * @static
  17695. */
  17696. public static function flash($key, $value = true)
  17697. {
  17698. /** @var \Illuminate\Session\Store $instance */
  17699. $instance->flash($key, $value);
  17700. }
  17701. /**
  17702. * Flash a key / value pair to the session for immediate use.
  17703. *
  17704. * @param string $key
  17705. * @param mixed $value
  17706. * @return void
  17707. * @static
  17708. */
  17709. public static function now($key, $value)
  17710. {
  17711. /** @var \Illuminate\Session\Store $instance */
  17712. $instance->now($key, $value);
  17713. }
  17714. /**
  17715. * Reflash all of the session flash data.
  17716. *
  17717. * @return void
  17718. * @static
  17719. */
  17720. public static function reflash()
  17721. {
  17722. /** @var \Illuminate\Session\Store $instance */
  17723. $instance->reflash();
  17724. }
  17725. /**
  17726. * Reflash a subset of the current flash data.
  17727. *
  17728. * @param array|mixed $keys
  17729. * @return void
  17730. * @static
  17731. */
  17732. public static function keep($keys = null)
  17733. {
  17734. /** @var \Illuminate\Session\Store $instance */
  17735. $instance->keep($keys);
  17736. }
  17737. /**
  17738. * Flash an input array to the session.
  17739. *
  17740. * @param array $value
  17741. * @return void
  17742. * @static
  17743. */
  17744. public static function flashInput($value)
  17745. {
  17746. /** @var \Illuminate\Session\Store $instance */
  17747. $instance->flashInput($value);
  17748. }
  17749. /**
  17750. * Remove an item from the session, returning its value.
  17751. *
  17752. * @param string $key
  17753. * @return mixed
  17754. * @static
  17755. */
  17756. public static function remove($key)
  17757. {
  17758. /** @var \Illuminate\Session\Store $instance */
  17759. return $instance->remove($key);
  17760. }
  17761. /**
  17762. * Remove one or many items from the session.
  17763. *
  17764. * @param string|array $keys
  17765. * @return void
  17766. * @static
  17767. */
  17768. public static function forget($keys)
  17769. {
  17770. /** @var \Illuminate\Session\Store $instance */
  17771. $instance->forget($keys);
  17772. }
  17773. /**
  17774. * Remove all of the items from the session.
  17775. *
  17776. * @return void
  17777. * @static
  17778. */
  17779. public static function flush()
  17780. {
  17781. /** @var \Illuminate\Session\Store $instance */
  17782. $instance->flush();
  17783. }
  17784. /**
  17785. * Flush the session data and regenerate the ID.
  17786. *
  17787. * @return bool
  17788. * @static
  17789. */
  17790. public static function invalidate()
  17791. {
  17792. /** @var \Illuminate\Session\Store $instance */
  17793. return $instance->invalidate();
  17794. }
  17795. /**
  17796. * Generate a new session identifier.
  17797. *
  17798. * @param bool $destroy
  17799. * @return bool
  17800. * @static
  17801. */
  17802. public static function regenerate($destroy = false)
  17803. {
  17804. /** @var \Illuminate\Session\Store $instance */
  17805. return $instance->regenerate($destroy);
  17806. }
  17807. /**
  17808. * Generate a new session ID for the session.
  17809. *
  17810. * @param bool $destroy
  17811. * @return bool
  17812. * @static
  17813. */
  17814. public static function migrate($destroy = false)
  17815. {
  17816. /** @var \Illuminate\Session\Store $instance */
  17817. return $instance->migrate($destroy);
  17818. }
  17819. /**
  17820. * Determine if the session has been started.
  17821. *
  17822. * @return bool
  17823. * @static
  17824. */
  17825. public static function isStarted()
  17826. {
  17827. /** @var \Illuminate\Session\Store $instance */
  17828. return $instance->isStarted();
  17829. }
  17830. /**
  17831. * Get the name of the session.
  17832. *
  17833. * @return string
  17834. * @static
  17835. */
  17836. public static function getName()
  17837. {
  17838. /** @var \Illuminate\Session\Store $instance */
  17839. return $instance->getName();
  17840. }
  17841. /**
  17842. * Set the name of the session.
  17843. *
  17844. * @param string $name
  17845. * @return void
  17846. * @static
  17847. */
  17848. public static function setName($name)
  17849. {
  17850. /** @var \Illuminate\Session\Store $instance */
  17851. $instance->setName($name);
  17852. }
  17853. /**
  17854. * Get the current session ID.
  17855. *
  17856. * @return string
  17857. * @static
  17858. */
  17859. public static function id()
  17860. {
  17861. /** @var \Illuminate\Session\Store $instance */
  17862. return $instance->id();
  17863. }
  17864. /**
  17865. * Get the current session ID.
  17866. *
  17867. * @return string
  17868. * @static
  17869. */
  17870. public static function getId()
  17871. {
  17872. /** @var \Illuminate\Session\Store $instance */
  17873. return $instance->getId();
  17874. }
  17875. /**
  17876. * Set the session ID.
  17877. *
  17878. * @param string|null $id
  17879. * @return void
  17880. * @static
  17881. */
  17882. public static function setId($id)
  17883. {
  17884. /** @var \Illuminate\Session\Store $instance */
  17885. $instance->setId($id);
  17886. }
  17887. /**
  17888. * Determine if this is a valid session ID.
  17889. *
  17890. * @param string|null $id
  17891. * @return bool
  17892. * @static
  17893. */
  17894. public static function isValidId($id)
  17895. {
  17896. /** @var \Illuminate\Session\Store $instance */
  17897. return $instance->isValidId($id);
  17898. }
  17899. /**
  17900. * Set the existence of the session on the handler if applicable.
  17901. *
  17902. * @param bool $value
  17903. * @return void
  17904. * @static
  17905. */
  17906. public static function setExists($value)
  17907. {
  17908. /** @var \Illuminate\Session\Store $instance */
  17909. $instance->setExists($value);
  17910. }
  17911. /**
  17912. * Get the CSRF token value.
  17913. *
  17914. * @return string
  17915. * @static
  17916. */
  17917. public static function token()
  17918. {
  17919. /** @var \Illuminate\Session\Store $instance */
  17920. return $instance->token();
  17921. }
  17922. /**
  17923. * Regenerate the CSRF token value.
  17924. *
  17925. * @return void
  17926. * @static
  17927. */
  17928. public static function regenerateToken()
  17929. {
  17930. /** @var \Illuminate\Session\Store $instance */
  17931. $instance->regenerateToken();
  17932. }
  17933. /**
  17934. * Determine if the previous URI is available.
  17935. *
  17936. * @return bool
  17937. * @static
  17938. */
  17939. public static function hasPreviousUri()
  17940. {
  17941. /** @var \Illuminate\Session\Store $instance */
  17942. return $instance->hasPreviousUri();
  17943. }
  17944. /**
  17945. * Get the previous URL from the session as a URI instance.
  17946. *
  17947. * @return \Illuminate\Support\Uri
  17948. * @throws \RuntimeException
  17949. * @static
  17950. */
  17951. public static function previousUri()
  17952. {
  17953. /** @var \Illuminate\Session\Store $instance */
  17954. return $instance->previousUri();
  17955. }
  17956. /**
  17957. * Get the previous URL from the session.
  17958. *
  17959. * @return string|null
  17960. * @static
  17961. */
  17962. public static function previousUrl()
  17963. {
  17964. /** @var \Illuminate\Session\Store $instance */
  17965. return $instance->previousUrl();
  17966. }
  17967. /**
  17968. * Set the "previous" URL in the session.
  17969. *
  17970. * @param string $url
  17971. * @return void
  17972. * @static
  17973. */
  17974. public static function setPreviousUrl($url)
  17975. {
  17976. /** @var \Illuminate\Session\Store $instance */
  17977. $instance->setPreviousUrl($url);
  17978. }
  17979. /**
  17980. * Specify that the user has confirmed their password.
  17981. *
  17982. * @return void
  17983. * @static
  17984. */
  17985. public static function passwordConfirmed()
  17986. {
  17987. /** @var \Illuminate\Session\Store $instance */
  17988. $instance->passwordConfirmed();
  17989. }
  17990. /**
  17991. * Get the underlying session handler implementation.
  17992. *
  17993. * @return \SessionHandlerInterface
  17994. * @static
  17995. */
  17996. public static function getHandler()
  17997. {
  17998. /** @var \Illuminate\Session\Store $instance */
  17999. return $instance->getHandler();
  18000. }
  18001. /**
  18002. * Set the underlying session handler implementation.
  18003. *
  18004. * @param \SessionHandlerInterface $handler
  18005. * @return \SessionHandlerInterface
  18006. * @static
  18007. */
  18008. public static function setHandler($handler)
  18009. {
  18010. /** @var \Illuminate\Session\Store $instance */
  18011. return $instance->setHandler($handler);
  18012. }
  18013. /**
  18014. * Determine if the session handler needs a request.
  18015. *
  18016. * @return bool
  18017. * @static
  18018. */
  18019. public static function handlerNeedsRequest()
  18020. {
  18021. /** @var \Illuminate\Session\Store $instance */
  18022. return $instance->handlerNeedsRequest();
  18023. }
  18024. /**
  18025. * Set the request on the handler instance.
  18026. *
  18027. * @param \Illuminate\Http\Request $request
  18028. * @return void
  18029. * @static
  18030. */
  18031. public static function setRequestOnHandler($request)
  18032. {
  18033. /** @var \Illuminate\Session\Store $instance */
  18034. $instance->setRequestOnHandler($request);
  18035. }
  18036. /**
  18037. * Register a custom macro.
  18038. *
  18039. * @param string $name
  18040. * @param object|callable $macro
  18041. * @param-closure-this static $macro
  18042. * @return void
  18043. * @static
  18044. */
  18045. public static function macro($name, $macro)
  18046. {
  18047. \Illuminate\Session\Store::macro($name, $macro);
  18048. }
  18049. /**
  18050. * Mix another object into the class.
  18051. *
  18052. * @param object $mixin
  18053. * @param bool $replace
  18054. * @return void
  18055. * @throws \ReflectionException
  18056. * @static
  18057. */
  18058. public static function mixin($mixin, $replace = true)
  18059. {
  18060. \Illuminate\Session\Store::mixin($mixin, $replace);
  18061. }
  18062. /**
  18063. * Checks if macro is registered.
  18064. *
  18065. * @param string $name
  18066. * @return bool
  18067. * @static
  18068. */
  18069. public static function hasMacro($name)
  18070. {
  18071. return \Illuminate\Session\Store::hasMacro($name);
  18072. }
  18073. /**
  18074. * Flush the existing macros.
  18075. *
  18076. * @return void
  18077. * @static
  18078. */
  18079. public static function flushMacros()
  18080. {
  18081. \Illuminate\Session\Store::flushMacros();
  18082. }
  18083. }
  18084. /**
  18085. * @method static bool has(string $location)
  18086. * @method static string read(string $location)
  18087. * @method static \League\Flysystem\DirectoryListing listContents(string $location, bool $deep = false)
  18088. * @method static int fileSize(string $path)
  18089. * @method static string visibility(string $path)
  18090. * @method static void write(string $location, string $contents, array $config = [])
  18091. * @method static void createDirectory(string $location, array $config = [])
  18092. * @see \Illuminate\Filesystem\FilesystemManager
  18093. */
  18094. class Storage {
  18095. /**
  18096. * Get a filesystem instance.
  18097. *
  18098. * @param string|null $name
  18099. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18100. * @static
  18101. */
  18102. public static function drive($name = null)
  18103. {
  18104. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18105. return $instance->drive($name);
  18106. }
  18107. /**
  18108. * Get a filesystem instance.
  18109. *
  18110. * @param string|null $name
  18111. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18112. * @static
  18113. */
  18114. public static function disk($name = null)
  18115. {
  18116. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18117. return $instance->disk($name);
  18118. }
  18119. /**
  18120. * Get a default cloud filesystem instance.
  18121. *
  18122. * @return \Illuminate\Contracts\Filesystem\Cloud
  18123. * @static
  18124. */
  18125. public static function cloud()
  18126. {
  18127. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18128. return $instance->cloud();
  18129. }
  18130. /**
  18131. * Build an on-demand disk.
  18132. *
  18133. * @param string|array $config
  18134. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18135. * @static
  18136. */
  18137. public static function build($config)
  18138. {
  18139. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18140. return $instance->build($config);
  18141. }
  18142. /**
  18143. * Create an instance of the local driver.
  18144. *
  18145. * @param array $config
  18146. * @param string $name
  18147. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18148. * @static
  18149. */
  18150. public static function createLocalDriver($config, $name = 'local')
  18151. {
  18152. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18153. return $instance->createLocalDriver($config, $name);
  18154. }
  18155. /**
  18156. * Create an instance of the ftp driver.
  18157. *
  18158. * @param array $config
  18159. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18160. * @static
  18161. */
  18162. public static function createFtpDriver($config)
  18163. {
  18164. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18165. return $instance->createFtpDriver($config);
  18166. }
  18167. /**
  18168. * Create an instance of the sftp driver.
  18169. *
  18170. * @param array $config
  18171. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18172. * @static
  18173. */
  18174. public static function createSftpDriver($config)
  18175. {
  18176. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18177. return $instance->createSftpDriver($config);
  18178. }
  18179. /**
  18180. * Create an instance of the Amazon S3 driver.
  18181. *
  18182. * @param array $config
  18183. * @return \Illuminate\Contracts\Filesystem\Cloud
  18184. * @static
  18185. */
  18186. public static function createS3Driver($config)
  18187. {
  18188. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18189. return $instance->createS3Driver($config);
  18190. }
  18191. /**
  18192. * Create a scoped driver.
  18193. *
  18194. * @param array $config
  18195. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18196. * @static
  18197. */
  18198. public static function createScopedDriver($config)
  18199. {
  18200. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18201. return $instance->createScopedDriver($config);
  18202. }
  18203. /**
  18204. * Set the given disk instance.
  18205. *
  18206. * @param string $name
  18207. * @param mixed $disk
  18208. * @return \Illuminate\Filesystem\FilesystemManager
  18209. * @static
  18210. */
  18211. public static function set($name, $disk)
  18212. {
  18213. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18214. return $instance->set($name, $disk);
  18215. }
  18216. /**
  18217. * Get the default driver name.
  18218. *
  18219. * @return string
  18220. * @static
  18221. */
  18222. public static function getDefaultDriver()
  18223. {
  18224. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18225. return $instance->getDefaultDriver();
  18226. }
  18227. /**
  18228. * Get the default cloud driver name.
  18229. *
  18230. * @return string
  18231. * @static
  18232. */
  18233. public static function getDefaultCloudDriver()
  18234. {
  18235. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18236. return $instance->getDefaultCloudDriver();
  18237. }
  18238. /**
  18239. * Unset the given disk instances.
  18240. *
  18241. * @param array|string $disk
  18242. * @return \Illuminate\Filesystem\FilesystemManager
  18243. * @static
  18244. */
  18245. public static function forgetDisk($disk)
  18246. {
  18247. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18248. return $instance->forgetDisk($disk);
  18249. }
  18250. /**
  18251. * Disconnect the given disk and remove from local cache.
  18252. *
  18253. * @param string|null $name
  18254. * @return void
  18255. * @static
  18256. */
  18257. public static function purge($name = null)
  18258. {
  18259. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18260. $instance->purge($name);
  18261. }
  18262. /**
  18263. * Register a custom driver creator Closure.
  18264. *
  18265. * @param string $driver
  18266. * @param \Closure $callback
  18267. * @return \Illuminate\Filesystem\FilesystemManager
  18268. * @static
  18269. */
  18270. public static function extend($driver, $callback)
  18271. {
  18272. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18273. return $instance->extend($driver, $callback);
  18274. }
  18275. /**
  18276. * Set the application instance used by the manager.
  18277. *
  18278. * @param \Illuminate\Contracts\Foundation\Application $app
  18279. * @return \Illuminate\Filesystem\FilesystemManager
  18280. * @static
  18281. */
  18282. public static function setApplication($app)
  18283. {
  18284. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18285. return $instance->setApplication($app);
  18286. }
  18287. /**
  18288. * Determine if temporary URLs can be generated.
  18289. *
  18290. * @return bool
  18291. * @static
  18292. */
  18293. public static function providesTemporaryUrls()
  18294. {
  18295. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18296. return $instance->providesTemporaryUrls();
  18297. }
  18298. /**
  18299. * Get a temporary URL for the file at the given path.
  18300. *
  18301. * @param string $path
  18302. * @param \DateTimeInterface $expiration
  18303. * @param array $options
  18304. * @return string
  18305. * @static
  18306. */
  18307. public static function temporaryUrl($path, $expiration, $options = [])
  18308. {
  18309. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18310. return $instance->temporaryUrl($path, $expiration, $options);
  18311. }
  18312. /**
  18313. * Specify the name of the disk the adapter is managing.
  18314. *
  18315. * @param string $disk
  18316. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18317. * @static
  18318. */
  18319. public static function diskName($disk)
  18320. {
  18321. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18322. return $instance->diskName($disk);
  18323. }
  18324. /**
  18325. * Indicate that signed URLs should serve the corresponding files.
  18326. *
  18327. * @param bool $serve
  18328. * @param \Closure|null $urlGeneratorResolver
  18329. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18330. * @static
  18331. */
  18332. public static function shouldServeSignedUrls($serve = true, $urlGeneratorResolver = null)
  18333. {
  18334. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18335. return $instance->shouldServeSignedUrls($serve, $urlGeneratorResolver);
  18336. }
  18337. /**
  18338. * Assert that the given file or directory exists.
  18339. *
  18340. * @param string|array $path
  18341. * @param string|null $content
  18342. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18343. * @static
  18344. */
  18345. public static function assertExists($path, $content = null)
  18346. {
  18347. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18348. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18349. return $instance->assertExists($path, $content);
  18350. }
  18351. /**
  18352. * Assert that the number of files in path equals the expected count.
  18353. *
  18354. * @param string $path
  18355. * @param int $count
  18356. * @param bool $recursive
  18357. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18358. * @static
  18359. */
  18360. public static function assertCount($path, $count, $recursive = false)
  18361. {
  18362. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18363. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18364. return $instance->assertCount($path, $count, $recursive);
  18365. }
  18366. /**
  18367. * Assert that the given file or directory does not exist.
  18368. *
  18369. * @param string|array $path
  18370. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18371. * @static
  18372. */
  18373. public static function assertMissing($path)
  18374. {
  18375. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18376. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18377. return $instance->assertMissing($path);
  18378. }
  18379. /**
  18380. * Assert that the given directory is empty.
  18381. *
  18382. * @param string $path
  18383. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18384. * @static
  18385. */
  18386. public static function assertDirectoryEmpty($path)
  18387. {
  18388. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18389. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18390. return $instance->assertDirectoryEmpty($path);
  18391. }
  18392. /**
  18393. * Determine if a file or directory exists.
  18394. *
  18395. * @param string $path
  18396. * @return bool
  18397. * @static
  18398. */
  18399. public static function exists($path)
  18400. {
  18401. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18402. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18403. return $instance->exists($path);
  18404. }
  18405. /**
  18406. * Determine if a file or directory is missing.
  18407. *
  18408. * @param string $path
  18409. * @return bool
  18410. * @static
  18411. */
  18412. public static function missing($path)
  18413. {
  18414. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18415. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18416. return $instance->missing($path);
  18417. }
  18418. /**
  18419. * Determine if a file exists.
  18420. *
  18421. * @param string $path
  18422. * @return bool
  18423. * @static
  18424. */
  18425. public static function fileExists($path)
  18426. {
  18427. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18428. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18429. return $instance->fileExists($path);
  18430. }
  18431. /**
  18432. * Determine if a file is missing.
  18433. *
  18434. * @param string $path
  18435. * @return bool
  18436. * @static
  18437. */
  18438. public static function fileMissing($path)
  18439. {
  18440. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18441. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18442. return $instance->fileMissing($path);
  18443. }
  18444. /**
  18445. * Determine if a directory exists.
  18446. *
  18447. * @param string $path
  18448. * @return bool
  18449. * @static
  18450. */
  18451. public static function directoryExists($path)
  18452. {
  18453. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18454. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18455. return $instance->directoryExists($path);
  18456. }
  18457. /**
  18458. * Determine if a directory is missing.
  18459. *
  18460. * @param string $path
  18461. * @return bool
  18462. * @static
  18463. */
  18464. public static function directoryMissing($path)
  18465. {
  18466. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18467. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18468. return $instance->directoryMissing($path);
  18469. }
  18470. /**
  18471. * Get the full path to the file that exists at the given relative path.
  18472. *
  18473. * @param string $path
  18474. * @return string
  18475. * @static
  18476. */
  18477. public static function path($path)
  18478. {
  18479. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18480. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18481. return $instance->path($path);
  18482. }
  18483. /**
  18484. * Get the contents of a file.
  18485. *
  18486. * @param string $path
  18487. * @return string|null
  18488. * @static
  18489. */
  18490. public static function get($path)
  18491. {
  18492. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18493. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18494. return $instance->get($path);
  18495. }
  18496. /**
  18497. * Get the contents of a file as decoded JSON.
  18498. *
  18499. * @param string $path
  18500. * @param int $flags
  18501. * @return array|null
  18502. * @static
  18503. */
  18504. public static function json($path, $flags = 0)
  18505. {
  18506. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18507. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18508. return $instance->json($path, $flags);
  18509. }
  18510. /**
  18511. * Create a streamed response for a given file.
  18512. *
  18513. * @param string $path
  18514. * @param string|null $name
  18515. * @param array $headers
  18516. * @param string|null $disposition
  18517. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18518. * @static
  18519. */
  18520. public static function response($path, $name = null, $headers = [], $disposition = 'inline')
  18521. {
  18522. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18523. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18524. return $instance->response($path, $name, $headers, $disposition);
  18525. }
  18526. /**
  18527. * Create a streamed download response for a given file.
  18528. *
  18529. * @param \Illuminate\Http\Request $request
  18530. * @param string $path
  18531. * @param string|null $name
  18532. * @param array $headers
  18533. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18534. * @static
  18535. */
  18536. public static function serve($request, $path, $name = null, $headers = [])
  18537. {
  18538. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18539. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18540. return $instance->serve($request, $path, $name, $headers);
  18541. }
  18542. /**
  18543. * Create a streamed download response for a given file.
  18544. *
  18545. * @param string $path
  18546. * @param string|null $name
  18547. * @param array $headers
  18548. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18549. * @static
  18550. */
  18551. public static function download($path, $name = null, $headers = [])
  18552. {
  18553. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18554. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18555. return $instance->download($path, $name, $headers);
  18556. }
  18557. /**
  18558. * Write the contents of a file.
  18559. *
  18560. * @param string $path
  18561. * @param \Psr\Http\Message\StreamInterface|\Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|resource $contents
  18562. * @param mixed $options
  18563. * @return string|bool
  18564. * @static
  18565. */
  18566. public static function put($path, $contents, $options = [])
  18567. {
  18568. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18569. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18570. return $instance->put($path, $contents, $options);
  18571. }
  18572. /**
  18573. * Store the uploaded file on the disk.
  18574. *
  18575. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
  18576. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
  18577. * @param mixed $options
  18578. * @return string|false
  18579. * @static
  18580. */
  18581. public static function putFile($path, $file = null, $options = [])
  18582. {
  18583. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18584. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18585. return $instance->putFile($path, $file, $options);
  18586. }
  18587. /**
  18588. * Store the uploaded file on the disk with a given name.
  18589. *
  18590. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
  18591. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
  18592. * @param string|array|null $name
  18593. * @param mixed $options
  18594. * @return string|false
  18595. * @static
  18596. */
  18597. public static function putFileAs($path, $file, $name = null, $options = [])
  18598. {
  18599. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18600. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18601. return $instance->putFileAs($path, $file, $name, $options);
  18602. }
  18603. /**
  18604. * Get the visibility for the given path.
  18605. *
  18606. * @param string $path
  18607. * @return string
  18608. * @static
  18609. */
  18610. public static function getVisibility($path)
  18611. {
  18612. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18613. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18614. return $instance->getVisibility($path);
  18615. }
  18616. /**
  18617. * Set the visibility for the given path.
  18618. *
  18619. * @param string $path
  18620. * @param string $visibility
  18621. * @return bool
  18622. * @static
  18623. */
  18624. public static function setVisibility($path, $visibility)
  18625. {
  18626. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18627. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18628. return $instance->setVisibility($path, $visibility);
  18629. }
  18630. /**
  18631. * Prepend to a file.
  18632. *
  18633. * @param string $path
  18634. * @param string $data
  18635. * @param string $separator
  18636. * @return bool
  18637. * @static
  18638. */
  18639. public static function prepend($path, $data, $separator = '
  18640. ')
  18641. {
  18642. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18643. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18644. return $instance->prepend($path, $data, $separator);
  18645. }
  18646. /**
  18647. * Append to a file.
  18648. *
  18649. * @param string $path
  18650. * @param string $data
  18651. * @param string $separator
  18652. * @return bool
  18653. * @static
  18654. */
  18655. public static function append($path, $data, $separator = '
  18656. ')
  18657. {
  18658. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18659. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18660. return $instance->append($path, $data, $separator);
  18661. }
  18662. /**
  18663. * Delete the file at a given path.
  18664. *
  18665. * @param string|array $paths
  18666. * @return bool
  18667. * @static
  18668. */
  18669. public static function delete($paths)
  18670. {
  18671. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18672. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18673. return $instance->delete($paths);
  18674. }
  18675. /**
  18676. * Copy a file to a new location.
  18677. *
  18678. * @param string $from
  18679. * @param string $to
  18680. * @return bool
  18681. * @static
  18682. */
  18683. public static function copy($from, $to)
  18684. {
  18685. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18686. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18687. return $instance->copy($from, $to);
  18688. }
  18689. /**
  18690. * Move a file to a new location.
  18691. *
  18692. * @param string $from
  18693. * @param string $to
  18694. * @return bool
  18695. * @static
  18696. */
  18697. public static function move($from, $to)
  18698. {
  18699. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18700. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18701. return $instance->move($from, $to);
  18702. }
  18703. /**
  18704. * Get the file size of a given file.
  18705. *
  18706. * @param string $path
  18707. * @return int
  18708. * @static
  18709. */
  18710. public static function size($path)
  18711. {
  18712. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18713. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18714. return $instance->size($path);
  18715. }
  18716. /**
  18717. * Get the checksum for a file.
  18718. *
  18719. * @return string|false
  18720. * @throws UnableToProvideChecksum
  18721. * @static
  18722. */
  18723. public static function checksum($path, $options = [])
  18724. {
  18725. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18726. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18727. return $instance->checksum($path, $options);
  18728. }
  18729. /**
  18730. * Get the mime-type of a given file.
  18731. *
  18732. * @param string $path
  18733. * @return string|false
  18734. * @static
  18735. */
  18736. public static function mimeType($path)
  18737. {
  18738. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18739. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18740. return $instance->mimeType($path);
  18741. }
  18742. /**
  18743. * Get the file's last modification time.
  18744. *
  18745. * @param string $path
  18746. * @return int
  18747. * @static
  18748. */
  18749. public static function lastModified($path)
  18750. {
  18751. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18752. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18753. return $instance->lastModified($path);
  18754. }
  18755. /**
  18756. * Get a resource to read the file.
  18757. *
  18758. * @param string $path
  18759. * @return resource|null The path resource or null on failure.
  18760. * @static
  18761. */
  18762. public static function readStream($path)
  18763. {
  18764. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18765. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18766. return $instance->readStream($path);
  18767. }
  18768. /**
  18769. * Write a new file using a stream.
  18770. *
  18771. * @param string $path
  18772. * @param resource $resource
  18773. * @param array $options
  18774. * @return bool
  18775. * @static
  18776. */
  18777. public static function writeStream($path, $resource, $options = [])
  18778. {
  18779. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18780. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18781. return $instance->writeStream($path, $resource, $options);
  18782. }
  18783. /**
  18784. * Get the URL for the file at the given path.
  18785. *
  18786. * @param string $path
  18787. * @return string
  18788. * @throws \RuntimeException
  18789. * @static
  18790. */
  18791. public static function url($path)
  18792. {
  18793. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18794. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18795. return $instance->url($path);
  18796. }
  18797. /**
  18798. * Get a temporary upload URL for the file at the given path.
  18799. *
  18800. * @param string $path
  18801. * @param \DateTimeInterface $expiration
  18802. * @param array $options
  18803. * @return array
  18804. * @throws \RuntimeException
  18805. * @static
  18806. */
  18807. public static function temporaryUploadUrl($path, $expiration, $options = [])
  18808. {
  18809. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18810. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18811. return $instance->temporaryUploadUrl($path, $expiration, $options);
  18812. }
  18813. /**
  18814. * Get an array of all files in a directory.
  18815. *
  18816. * @param string|null $directory
  18817. * @param bool $recursive
  18818. * @return array
  18819. * @static
  18820. */
  18821. public static function files($directory = null, $recursive = false)
  18822. {
  18823. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18824. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18825. return $instance->files($directory, $recursive);
  18826. }
  18827. /**
  18828. * Get all of the files from the given directory (recursive).
  18829. *
  18830. * @param string|null $directory
  18831. * @return array
  18832. * @static
  18833. */
  18834. public static function allFiles($directory = null)
  18835. {
  18836. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18837. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18838. return $instance->allFiles($directory);
  18839. }
  18840. /**
  18841. * Get all of the directories within a given directory.
  18842. *
  18843. * @param string|null $directory
  18844. * @param bool $recursive
  18845. * @return array
  18846. * @static
  18847. */
  18848. public static function directories($directory = null, $recursive = false)
  18849. {
  18850. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18851. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18852. return $instance->directories($directory, $recursive);
  18853. }
  18854. /**
  18855. * Get all the directories within a given directory (recursive).
  18856. *
  18857. * @param string|null $directory
  18858. * @return array
  18859. * @static
  18860. */
  18861. public static function allDirectories($directory = null)
  18862. {
  18863. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18864. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18865. return $instance->allDirectories($directory);
  18866. }
  18867. /**
  18868. * Create a directory.
  18869. *
  18870. * @param string $path
  18871. * @return bool
  18872. * @static
  18873. */
  18874. public static function makeDirectory($path)
  18875. {
  18876. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18877. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18878. return $instance->makeDirectory($path);
  18879. }
  18880. /**
  18881. * Recursively delete a directory.
  18882. *
  18883. * @param string $directory
  18884. * @return bool
  18885. * @static
  18886. */
  18887. public static function deleteDirectory($directory)
  18888. {
  18889. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18890. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18891. return $instance->deleteDirectory($directory);
  18892. }
  18893. /**
  18894. * Get the Flysystem driver.
  18895. *
  18896. * @return \League\Flysystem\FilesystemOperator
  18897. * @static
  18898. */
  18899. public static function getDriver()
  18900. {
  18901. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18902. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18903. return $instance->getDriver();
  18904. }
  18905. /**
  18906. * Get the Flysystem adapter.
  18907. *
  18908. * @return \League\Flysystem\FilesystemAdapter
  18909. * @static
  18910. */
  18911. public static function getAdapter()
  18912. {
  18913. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18914. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18915. return $instance->getAdapter();
  18916. }
  18917. /**
  18918. * Get the configuration values.
  18919. *
  18920. * @return array
  18921. * @static
  18922. */
  18923. public static function getConfig()
  18924. {
  18925. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18926. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18927. return $instance->getConfig();
  18928. }
  18929. /**
  18930. * Define a custom callback that generates file download responses.
  18931. *
  18932. * @param \Closure $callback
  18933. * @return void
  18934. * @static
  18935. */
  18936. public static function serveUsing($callback)
  18937. {
  18938. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18939. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18940. $instance->serveUsing($callback);
  18941. }
  18942. /**
  18943. * Define a custom temporary URL builder callback.
  18944. *
  18945. * @param \Closure $callback
  18946. * @return void
  18947. * @static
  18948. */
  18949. public static function buildTemporaryUrlsUsing($callback)
  18950. {
  18951. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18952. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18953. $instance->buildTemporaryUrlsUsing($callback);
  18954. }
  18955. /**
  18956. * Apply the callback if the given "value" is (or resolves to) truthy.
  18957. *
  18958. * @template TWhenParameter
  18959. * @template TWhenReturnType
  18960. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  18961. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  18962. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  18963. * @return $this|TWhenReturnType
  18964. * @static
  18965. */
  18966. public static function when($value = null, $callback = null, $default = null)
  18967. {
  18968. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18969. return $instance->when($value, $callback, $default);
  18970. }
  18971. /**
  18972. * Apply the callback if the given "value" is (or resolves to) falsy.
  18973. *
  18974. * @template TUnlessParameter
  18975. * @template TUnlessReturnType
  18976. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  18977. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  18978. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  18979. * @return $this|TUnlessReturnType
  18980. * @static
  18981. */
  18982. public static function unless($value = null, $callback = null, $default = null)
  18983. {
  18984. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18985. return $instance->unless($value, $callback, $default);
  18986. }
  18987. /**
  18988. * Register a custom macro.
  18989. *
  18990. * @param string $name
  18991. * @param object|callable $macro
  18992. * @param-closure-this static $macro
  18993. * @return void
  18994. * @static
  18995. */
  18996. public static function macro($name, $macro)
  18997. {
  18998. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18999. \Illuminate\Filesystem\LocalFilesystemAdapter::macro($name, $macro);
  19000. }
  19001. /**
  19002. * Mix another object into the class.
  19003. *
  19004. * @param object $mixin
  19005. * @param bool $replace
  19006. * @return void
  19007. * @throws \ReflectionException
  19008. * @static
  19009. */
  19010. public static function mixin($mixin, $replace = true)
  19011. {
  19012. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19013. \Illuminate\Filesystem\LocalFilesystemAdapter::mixin($mixin, $replace);
  19014. }
  19015. /**
  19016. * Checks if macro is registered.
  19017. *
  19018. * @param string $name
  19019. * @return bool
  19020. * @static
  19021. */
  19022. public static function hasMacro($name)
  19023. {
  19024. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19025. return \Illuminate\Filesystem\LocalFilesystemAdapter::hasMacro($name);
  19026. }
  19027. /**
  19028. * Flush the existing macros.
  19029. *
  19030. * @return void
  19031. * @static
  19032. */
  19033. public static function flushMacros()
  19034. {
  19035. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19036. \Illuminate\Filesystem\LocalFilesystemAdapter::flushMacros();
  19037. }
  19038. /**
  19039. * Dynamically handle calls to the class.
  19040. *
  19041. * @param string $method
  19042. * @param array $parameters
  19043. * @return mixed
  19044. * @throws \BadMethodCallException
  19045. * @static
  19046. */
  19047. public static function macroCall($method, $parameters)
  19048. {
  19049. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19050. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  19051. return $instance->macroCall($method, $parameters);
  19052. }
  19053. }
  19054. /**
  19055. * @see \Illuminate\Routing\UrlGenerator
  19056. */
  19057. class URL {
  19058. /**
  19059. * Get the full URL for the current request.
  19060. *
  19061. * @return string
  19062. * @static
  19063. */
  19064. public static function full()
  19065. {
  19066. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19067. return $instance->full();
  19068. }
  19069. /**
  19070. * Get the current URL for the request.
  19071. *
  19072. * @return string
  19073. * @static
  19074. */
  19075. public static function current()
  19076. {
  19077. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19078. return $instance->current();
  19079. }
  19080. /**
  19081. * Get the URL for the previous request.
  19082. *
  19083. * @param mixed $fallback
  19084. * @return string
  19085. * @static
  19086. */
  19087. public static function previous($fallback = false)
  19088. {
  19089. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19090. return $instance->previous($fallback);
  19091. }
  19092. /**
  19093. * Get the previous path info for the request.
  19094. *
  19095. * @param mixed $fallback
  19096. * @return string
  19097. * @static
  19098. */
  19099. public static function previousPath($fallback = false)
  19100. {
  19101. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19102. return $instance->previousPath($fallback);
  19103. }
  19104. /**
  19105. * Generate an absolute URL to the given path.
  19106. *
  19107. * @param string $path
  19108. * @param mixed $extra
  19109. * @param bool|null $secure
  19110. * @return string
  19111. * @static
  19112. */
  19113. public static function to($path, $extra = [], $secure = null)
  19114. {
  19115. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19116. return $instance->to($path, $extra, $secure);
  19117. }
  19118. /**
  19119. * Generate an absolute URL with the given query parameters.
  19120. *
  19121. * @param string $path
  19122. * @param array $query
  19123. * @param mixed $extra
  19124. * @param bool|null $secure
  19125. * @return string
  19126. * @static
  19127. */
  19128. public static function query($path, $query = [], $extra = [], $secure = null)
  19129. {
  19130. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19131. return $instance->query($path, $query, $extra, $secure);
  19132. }
  19133. /**
  19134. * Generate a secure, absolute URL to the given path.
  19135. *
  19136. * @param string $path
  19137. * @param array $parameters
  19138. * @return string
  19139. * @static
  19140. */
  19141. public static function secure($path, $parameters = [])
  19142. {
  19143. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19144. return $instance->secure($path, $parameters);
  19145. }
  19146. /**
  19147. * Generate the URL to an application asset.
  19148. *
  19149. * @param string $path
  19150. * @param bool|null $secure
  19151. * @return string
  19152. * @static
  19153. */
  19154. public static function asset($path, $secure = null)
  19155. {
  19156. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19157. return $instance->asset($path, $secure);
  19158. }
  19159. /**
  19160. * Generate the URL to a secure asset.
  19161. *
  19162. * @param string $path
  19163. * @return string
  19164. * @static
  19165. */
  19166. public static function secureAsset($path)
  19167. {
  19168. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19169. return $instance->secureAsset($path);
  19170. }
  19171. /**
  19172. * Generate the URL to an asset from a custom root domain such as CDN, etc.
  19173. *
  19174. * @param string $root
  19175. * @param string $path
  19176. * @param bool|null $secure
  19177. * @return string
  19178. * @static
  19179. */
  19180. public static function assetFrom($root, $path, $secure = null)
  19181. {
  19182. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19183. return $instance->assetFrom($root, $path, $secure);
  19184. }
  19185. /**
  19186. * Get the default scheme for a raw URL.
  19187. *
  19188. * @param bool|null $secure
  19189. * @return string
  19190. * @static
  19191. */
  19192. public static function formatScheme($secure = null)
  19193. {
  19194. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19195. return $instance->formatScheme($secure);
  19196. }
  19197. /**
  19198. * Create a signed route URL for a named route.
  19199. *
  19200. * @param \BackedEnum|string $name
  19201. * @param mixed $parameters
  19202. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  19203. * @param bool $absolute
  19204. * @return string
  19205. * @throws \InvalidArgumentException
  19206. * @static
  19207. */
  19208. public static function signedRoute($name, $parameters = [], $expiration = null, $absolute = true)
  19209. {
  19210. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19211. return $instance->signedRoute($name, $parameters, $expiration, $absolute);
  19212. }
  19213. /**
  19214. * Create a temporary signed route URL for a named route.
  19215. *
  19216. * @param \BackedEnum|string $name
  19217. * @param \DateTimeInterface|\DateInterval|int $expiration
  19218. * @param array $parameters
  19219. * @param bool $absolute
  19220. * @return string
  19221. * @static
  19222. */
  19223. public static function temporarySignedRoute($name, $expiration, $parameters = [], $absolute = true)
  19224. {
  19225. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19226. return $instance->temporarySignedRoute($name, $expiration, $parameters, $absolute);
  19227. }
  19228. /**
  19229. * Determine if the given request has a valid signature.
  19230. *
  19231. * @param \Illuminate\Http\Request $request
  19232. * @param bool $absolute
  19233. * @param \Closure|array $ignoreQuery
  19234. * @return bool
  19235. * @static
  19236. */
  19237. public static function hasValidSignature($request, $absolute = true, $ignoreQuery = [])
  19238. {
  19239. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19240. return $instance->hasValidSignature($request, $absolute, $ignoreQuery);
  19241. }
  19242. /**
  19243. * Determine if the given request has a valid signature for a relative URL.
  19244. *
  19245. * @param \Illuminate\Http\Request $request
  19246. * @param \Closure|array $ignoreQuery
  19247. * @return bool
  19248. * @static
  19249. */
  19250. public static function hasValidRelativeSignature($request, $ignoreQuery = [])
  19251. {
  19252. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19253. return $instance->hasValidRelativeSignature($request, $ignoreQuery);
  19254. }
  19255. /**
  19256. * Determine if the signature from the given request matches the URL.
  19257. *
  19258. * @param \Illuminate\Http\Request $request
  19259. * @param bool $absolute
  19260. * @param \Closure|array $ignoreQuery
  19261. * @return bool
  19262. * @static
  19263. */
  19264. public static function hasCorrectSignature($request, $absolute = true, $ignoreQuery = [])
  19265. {
  19266. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19267. return $instance->hasCorrectSignature($request, $absolute, $ignoreQuery);
  19268. }
  19269. /**
  19270. * Determine if the expires timestamp from the given request is not from the past.
  19271. *
  19272. * @param \Illuminate\Http\Request $request
  19273. * @return bool
  19274. * @static
  19275. */
  19276. public static function signatureHasNotExpired($request)
  19277. {
  19278. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19279. return $instance->signatureHasNotExpired($request);
  19280. }
  19281. /**
  19282. * Get the URL to a named route.
  19283. *
  19284. * @param \BackedEnum|string $name
  19285. * @param mixed $parameters
  19286. * @param bool $absolute
  19287. * @return string
  19288. * @throws \Symfony\Component\Routing\Exception\RouteNotFoundException|\InvalidArgumentException
  19289. * @static
  19290. */
  19291. public static function route($name, $parameters = [], $absolute = true)
  19292. {
  19293. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19294. return $instance->route($name, $parameters, $absolute);
  19295. }
  19296. /**
  19297. * Get the URL for a given route instance.
  19298. *
  19299. * @param \Illuminate\Routing\Route $route
  19300. * @param mixed $parameters
  19301. * @param bool $absolute
  19302. * @return string
  19303. * @throws \Illuminate\Routing\Exceptions\UrlGenerationException
  19304. * @static
  19305. */
  19306. public static function toRoute($route, $parameters, $absolute)
  19307. {
  19308. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19309. return $instance->toRoute($route, $parameters, $absolute);
  19310. }
  19311. /**
  19312. * Get the URL to a controller action.
  19313. *
  19314. * @param string|array $action
  19315. * @param mixed $parameters
  19316. * @param bool $absolute
  19317. * @return string
  19318. * @throws \InvalidArgumentException
  19319. * @static
  19320. */
  19321. public static function action($action, $parameters = [], $absolute = true)
  19322. {
  19323. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19324. return $instance->action($action, $parameters, $absolute);
  19325. }
  19326. /**
  19327. * Format the array of URL parameters.
  19328. *
  19329. * @param mixed $parameters
  19330. * @return array
  19331. * @static
  19332. */
  19333. public static function formatParameters($parameters)
  19334. {
  19335. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19336. return $instance->formatParameters($parameters);
  19337. }
  19338. /**
  19339. * Get the base URL for the request.
  19340. *
  19341. * @param string $scheme
  19342. * @param string|null $root
  19343. * @return string
  19344. * @static
  19345. */
  19346. public static function formatRoot($scheme, $root = null)
  19347. {
  19348. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19349. return $instance->formatRoot($scheme, $root);
  19350. }
  19351. /**
  19352. * Format the given URL segments into a single URL.
  19353. *
  19354. * @param string $root
  19355. * @param string $path
  19356. * @param \Illuminate\Routing\Route|null $route
  19357. * @return string
  19358. * @static
  19359. */
  19360. public static function format($root, $path, $route = null)
  19361. {
  19362. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19363. return $instance->format($root, $path, $route);
  19364. }
  19365. /**
  19366. * Determine if the given path is a valid URL.
  19367. *
  19368. * @param string $path
  19369. * @return bool
  19370. * @static
  19371. */
  19372. public static function isValidUrl($path)
  19373. {
  19374. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19375. return $instance->isValidUrl($path);
  19376. }
  19377. /**
  19378. * Set the default named parameters used by the URL generator.
  19379. *
  19380. * @param array $defaults
  19381. * @return void
  19382. * @static
  19383. */
  19384. public static function defaults($defaults)
  19385. {
  19386. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19387. $instance->defaults($defaults);
  19388. }
  19389. /**
  19390. * Get the default named parameters used by the URL generator.
  19391. *
  19392. * @return array
  19393. * @static
  19394. */
  19395. public static function getDefaultParameters()
  19396. {
  19397. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19398. return $instance->getDefaultParameters();
  19399. }
  19400. /**
  19401. * Force the scheme for URLs.
  19402. *
  19403. * @param string|null $scheme
  19404. * @return void
  19405. * @static
  19406. */
  19407. public static function forceScheme($scheme)
  19408. {
  19409. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19410. $instance->forceScheme($scheme);
  19411. }
  19412. /**
  19413. * Force the use of the HTTPS scheme for all generated URLs.
  19414. *
  19415. * @param bool $force
  19416. * @return void
  19417. * @static
  19418. */
  19419. public static function forceHttps($force = true)
  19420. {
  19421. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19422. $instance->forceHttps($force);
  19423. }
  19424. /**
  19425. * Set the URL origin for all generated URLs.
  19426. *
  19427. * @param string|null $root
  19428. * @return void
  19429. * @static
  19430. */
  19431. public static function useOrigin($root)
  19432. {
  19433. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19434. $instance->useOrigin($root);
  19435. }
  19436. /**
  19437. * Set the forced root URL.
  19438. *
  19439. * @param string|null $root
  19440. * @return void
  19441. * @deprecated Use useOrigin
  19442. * @static
  19443. */
  19444. public static function forceRootUrl($root)
  19445. {
  19446. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19447. $instance->forceRootUrl($root);
  19448. }
  19449. /**
  19450. * Set the URL origin for all generated asset URLs.
  19451. *
  19452. * @param string|null $root
  19453. * @return void
  19454. * @static
  19455. */
  19456. public static function useAssetOrigin($root)
  19457. {
  19458. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19459. $instance->useAssetOrigin($root);
  19460. }
  19461. /**
  19462. * Set a callback to be used to format the host of generated URLs.
  19463. *
  19464. * @param \Closure $callback
  19465. * @return \Illuminate\Routing\UrlGenerator
  19466. * @static
  19467. */
  19468. public static function formatHostUsing($callback)
  19469. {
  19470. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19471. return $instance->formatHostUsing($callback);
  19472. }
  19473. /**
  19474. * Set a callback to be used to format the path of generated URLs.
  19475. *
  19476. * @param \Closure $callback
  19477. * @return \Illuminate\Routing\UrlGenerator
  19478. * @static
  19479. */
  19480. public static function formatPathUsing($callback)
  19481. {
  19482. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19483. return $instance->formatPathUsing($callback);
  19484. }
  19485. /**
  19486. * Get the path formatter being used by the URL generator.
  19487. *
  19488. * @return \Closure
  19489. * @static
  19490. */
  19491. public static function pathFormatter()
  19492. {
  19493. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19494. return $instance->pathFormatter();
  19495. }
  19496. /**
  19497. * Get the request instance.
  19498. *
  19499. * @return \Illuminate\Http\Request
  19500. * @static
  19501. */
  19502. public static function getRequest()
  19503. {
  19504. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19505. return $instance->getRequest();
  19506. }
  19507. /**
  19508. * Set the current request instance.
  19509. *
  19510. * @param \Illuminate\Http\Request $request
  19511. * @return void
  19512. * @static
  19513. */
  19514. public static function setRequest($request)
  19515. {
  19516. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19517. $instance->setRequest($request);
  19518. }
  19519. /**
  19520. * Set the route collection.
  19521. *
  19522. * @param \Illuminate\Routing\RouteCollectionInterface $routes
  19523. * @return \Illuminate\Routing\UrlGenerator
  19524. * @static
  19525. */
  19526. public static function setRoutes($routes)
  19527. {
  19528. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19529. return $instance->setRoutes($routes);
  19530. }
  19531. /**
  19532. * Set the session resolver for the generator.
  19533. *
  19534. * @param callable $sessionResolver
  19535. * @return \Illuminate\Routing\UrlGenerator
  19536. * @static
  19537. */
  19538. public static function setSessionResolver($sessionResolver)
  19539. {
  19540. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19541. return $instance->setSessionResolver($sessionResolver);
  19542. }
  19543. /**
  19544. * Set the encryption key resolver.
  19545. *
  19546. * @param callable $keyResolver
  19547. * @return \Illuminate\Routing\UrlGenerator
  19548. * @static
  19549. */
  19550. public static function setKeyResolver($keyResolver)
  19551. {
  19552. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19553. return $instance->setKeyResolver($keyResolver);
  19554. }
  19555. /**
  19556. * Clone a new instance of the URL generator with a different encryption key resolver.
  19557. *
  19558. * @param callable $keyResolver
  19559. * @return \Illuminate\Routing\UrlGenerator
  19560. * @static
  19561. */
  19562. public static function withKeyResolver($keyResolver)
  19563. {
  19564. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19565. return $instance->withKeyResolver($keyResolver);
  19566. }
  19567. /**
  19568. * Set the callback that should be used to attempt to resolve missing named routes.
  19569. *
  19570. * @param callable $missingNamedRouteResolver
  19571. * @return \Illuminate\Routing\UrlGenerator
  19572. * @static
  19573. */
  19574. public static function resolveMissingNamedRoutesUsing($missingNamedRouteResolver)
  19575. {
  19576. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19577. return $instance->resolveMissingNamedRoutesUsing($missingNamedRouteResolver);
  19578. }
  19579. /**
  19580. * Get the root controller namespace.
  19581. *
  19582. * @return string
  19583. * @static
  19584. */
  19585. public static function getRootControllerNamespace()
  19586. {
  19587. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19588. return $instance->getRootControllerNamespace();
  19589. }
  19590. /**
  19591. * Set the root controller namespace.
  19592. *
  19593. * @param string $rootNamespace
  19594. * @return \Illuminate\Routing\UrlGenerator
  19595. * @static
  19596. */
  19597. public static function setRootControllerNamespace($rootNamespace)
  19598. {
  19599. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19600. return $instance->setRootControllerNamespace($rootNamespace);
  19601. }
  19602. /**
  19603. * Register a custom macro.
  19604. *
  19605. * @param string $name
  19606. * @param object|callable $macro
  19607. * @param-closure-this static $macro
  19608. * @return void
  19609. * @static
  19610. */
  19611. public static function macro($name, $macro)
  19612. {
  19613. \Illuminate\Routing\UrlGenerator::macro($name, $macro);
  19614. }
  19615. /**
  19616. * Mix another object into the class.
  19617. *
  19618. * @param object $mixin
  19619. * @param bool $replace
  19620. * @return void
  19621. * @throws \ReflectionException
  19622. * @static
  19623. */
  19624. public static function mixin($mixin, $replace = true)
  19625. {
  19626. \Illuminate\Routing\UrlGenerator::mixin($mixin, $replace);
  19627. }
  19628. /**
  19629. * Checks if macro is registered.
  19630. *
  19631. * @param string $name
  19632. * @return bool
  19633. * @static
  19634. */
  19635. public static function hasMacro($name)
  19636. {
  19637. return \Illuminate\Routing\UrlGenerator::hasMacro($name);
  19638. }
  19639. /**
  19640. * Flush the existing macros.
  19641. *
  19642. * @return void
  19643. * @static
  19644. */
  19645. public static function flushMacros()
  19646. {
  19647. \Illuminate\Routing\UrlGenerator::flushMacros();
  19648. }
  19649. }
  19650. /**
  19651. * @see \Illuminate\Validation\Factory
  19652. */
  19653. class Validator {
  19654. /**
  19655. * Create a new Validator instance.
  19656. *
  19657. * @param array $data
  19658. * @param array $rules
  19659. * @param array $messages
  19660. * @param array $attributes
  19661. * @return \Illuminate\Validation\Validator
  19662. * @static
  19663. */
  19664. public static function make($data, $rules, $messages = [], $attributes = [])
  19665. {
  19666. /** @var \Illuminate\Validation\Factory $instance */
  19667. return $instance->make($data, $rules, $messages, $attributes);
  19668. }
  19669. /**
  19670. * Validate the given data against the provided rules.
  19671. *
  19672. * @param array $data
  19673. * @param array $rules
  19674. * @param array $messages
  19675. * @param array $attributes
  19676. * @return array
  19677. * @throws \Illuminate\Validation\ValidationException
  19678. * @static
  19679. */
  19680. public static function validate($data, $rules, $messages = [], $attributes = [])
  19681. {
  19682. /** @var \Illuminate\Validation\Factory $instance */
  19683. return $instance->validate($data, $rules, $messages, $attributes);
  19684. }
  19685. /**
  19686. * Register a custom validator extension.
  19687. *
  19688. * @param string $rule
  19689. * @param \Closure|string $extension
  19690. * @param string|null $message
  19691. * @return void
  19692. * @static
  19693. */
  19694. public static function extend($rule, $extension, $message = null)
  19695. {
  19696. /** @var \Illuminate\Validation\Factory $instance */
  19697. $instance->extend($rule, $extension, $message);
  19698. }
  19699. /**
  19700. * Register a custom implicit validator extension.
  19701. *
  19702. * @param string $rule
  19703. * @param \Closure|string $extension
  19704. * @param string|null $message
  19705. * @return void
  19706. * @static
  19707. */
  19708. public static function extendImplicit($rule, $extension, $message = null)
  19709. {
  19710. /** @var \Illuminate\Validation\Factory $instance */
  19711. $instance->extendImplicit($rule, $extension, $message);
  19712. }
  19713. /**
  19714. * Register a custom dependent validator extension.
  19715. *
  19716. * @param string $rule
  19717. * @param \Closure|string $extension
  19718. * @param string|null $message
  19719. * @return void
  19720. * @static
  19721. */
  19722. public static function extendDependent($rule, $extension, $message = null)
  19723. {
  19724. /** @var \Illuminate\Validation\Factory $instance */
  19725. $instance->extendDependent($rule, $extension, $message);
  19726. }
  19727. /**
  19728. * Register a custom validator message replacer.
  19729. *
  19730. * @param string $rule
  19731. * @param \Closure|string $replacer
  19732. * @return void
  19733. * @static
  19734. */
  19735. public static function replacer($rule, $replacer)
  19736. {
  19737. /** @var \Illuminate\Validation\Factory $instance */
  19738. $instance->replacer($rule, $replacer);
  19739. }
  19740. /**
  19741. * Indicate that unvalidated array keys should be included in validated data when the parent array is validated.
  19742. *
  19743. * @return void
  19744. * @static
  19745. */
  19746. public static function includeUnvalidatedArrayKeys()
  19747. {
  19748. /** @var \Illuminate\Validation\Factory $instance */
  19749. $instance->includeUnvalidatedArrayKeys();
  19750. }
  19751. /**
  19752. * Indicate that unvalidated array keys should be excluded from the validated data, even if the parent array was validated.
  19753. *
  19754. * @return void
  19755. * @static
  19756. */
  19757. public static function excludeUnvalidatedArrayKeys()
  19758. {
  19759. /** @var \Illuminate\Validation\Factory $instance */
  19760. $instance->excludeUnvalidatedArrayKeys();
  19761. }
  19762. /**
  19763. * Set the Validator instance resolver.
  19764. *
  19765. * @param \Closure $resolver
  19766. * @return void
  19767. * @static
  19768. */
  19769. public static function resolver($resolver)
  19770. {
  19771. /** @var \Illuminate\Validation\Factory $instance */
  19772. $instance->resolver($resolver);
  19773. }
  19774. /**
  19775. * Get the Translator implementation.
  19776. *
  19777. * @return \Illuminate\Contracts\Translation\Translator
  19778. * @static
  19779. */
  19780. public static function getTranslator()
  19781. {
  19782. /** @var \Illuminate\Validation\Factory $instance */
  19783. return $instance->getTranslator();
  19784. }
  19785. /**
  19786. * Get the Presence Verifier implementation.
  19787. *
  19788. * @return \Illuminate\Validation\PresenceVerifierInterface
  19789. * @static
  19790. */
  19791. public static function getPresenceVerifier()
  19792. {
  19793. /** @var \Illuminate\Validation\Factory $instance */
  19794. return $instance->getPresenceVerifier();
  19795. }
  19796. /**
  19797. * Set the Presence Verifier implementation.
  19798. *
  19799. * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier
  19800. * @return void
  19801. * @static
  19802. */
  19803. public static function setPresenceVerifier($presenceVerifier)
  19804. {
  19805. /** @var \Illuminate\Validation\Factory $instance */
  19806. $instance->setPresenceVerifier($presenceVerifier);
  19807. }
  19808. /**
  19809. * Get the container instance used by the validation factory.
  19810. *
  19811. * @return \Illuminate\Contracts\Container\Container|null
  19812. * @static
  19813. */
  19814. public static function getContainer()
  19815. {
  19816. /** @var \Illuminate\Validation\Factory $instance */
  19817. return $instance->getContainer();
  19818. }
  19819. /**
  19820. * Set the container instance used by the validation factory.
  19821. *
  19822. * @param \Illuminate\Contracts\Container\Container $container
  19823. * @return \Illuminate\Validation\Factory
  19824. * @static
  19825. */
  19826. public static function setContainer($container)
  19827. {
  19828. /** @var \Illuminate\Validation\Factory $instance */
  19829. return $instance->setContainer($container);
  19830. }
  19831. }
  19832. /**
  19833. * @see \Illuminate\View\Factory
  19834. */
  19835. class View {
  19836. /**
  19837. * Get the evaluated view contents for the given view.
  19838. *
  19839. * @param string $path
  19840. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19841. * @param array $mergeData
  19842. * @return \Illuminate\Contracts\View\View
  19843. * @static
  19844. */
  19845. public static function file($path, $data = [], $mergeData = [])
  19846. {
  19847. /** @var \Illuminate\View\Factory $instance */
  19848. return $instance->file($path, $data, $mergeData);
  19849. }
  19850. /**
  19851. * Get the evaluated view contents for the given view.
  19852. *
  19853. * @param string $view
  19854. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19855. * @param array $mergeData
  19856. * @return \Illuminate\Contracts\View\View
  19857. * @static
  19858. */
  19859. public static function make($view, $data = [], $mergeData = [])
  19860. {
  19861. /** @var \Illuminate\View\Factory $instance */
  19862. return $instance->make($view, $data, $mergeData);
  19863. }
  19864. /**
  19865. * Get the first view that actually exists from the given list.
  19866. *
  19867. * @param array $views
  19868. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19869. * @param array $mergeData
  19870. * @return \Illuminate\Contracts\View\View
  19871. * @throws \InvalidArgumentException
  19872. * @static
  19873. */
  19874. public static function first($views, $data = [], $mergeData = [])
  19875. {
  19876. /** @var \Illuminate\View\Factory $instance */
  19877. return $instance->first($views, $data, $mergeData);
  19878. }
  19879. /**
  19880. * Get the rendered content of the view based on a given condition.
  19881. *
  19882. * @param bool $condition
  19883. * @param string $view
  19884. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19885. * @param array $mergeData
  19886. * @return string
  19887. * @static
  19888. */
  19889. public static function renderWhen($condition, $view, $data = [], $mergeData = [])
  19890. {
  19891. /** @var \Illuminate\View\Factory $instance */
  19892. return $instance->renderWhen($condition, $view, $data, $mergeData);
  19893. }
  19894. /**
  19895. * Get the rendered content of the view based on the negation of a given condition.
  19896. *
  19897. * @param bool $condition
  19898. * @param string $view
  19899. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19900. * @param array $mergeData
  19901. * @return string
  19902. * @static
  19903. */
  19904. public static function renderUnless($condition, $view, $data = [], $mergeData = [])
  19905. {
  19906. /** @var \Illuminate\View\Factory $instance */
  19907. return $instance->renderUnless($condition, $view, $data, $mergeData);
  19908. }
  19909. /**
  19910. * Get the rendered contents of a partial from a loop.
  19911. *
  19912. * @param string $view
  19913. * @param array $data
  19914. * @param string $iterator
  19915. * @param string $empty
  19916. * @return string
  19917. * @static
  19918. */
  19919. public static function renderEach($view, $data, $iterator, $empty = 'raw|')
  19920. {
  19921. /** @var \Illuminate\View\Factory $instance */
  19922. return $instance->renderEach($view, $data, $iterator, $empty);
  19923. }
  19924. /**
  19925. * Determine if a given view exists.
  19926. *
  19927. * @param string $view
  19928. * @return bool
  19929. * @static
  19930. */
  19931. public static function exists($view)
  19932. {
  19933. /** @var \Illuminate\View\Factory $instance */
  19934. return $instance->exists($view);
  19935. }
  19936. /**
  19937. * Get the appropriate view engine for the given path.
  19938. *
  19939. * @param string $path
  19940. * @return \Illuminate\Contracts\View\Engine
  19941. * @throws \InvalidArgumentException
  19942. * @static
  19943. */
  19944. public static function getEngineFromPath($path)
  19945. {
  19946. /** @var \Illuminate\View\Factory $instance */
  19947. return $instance->getEngineFromPath($path);
  19948. }
  19949. /**
  19950. * Add a piece of shared data to the environment.
  19951. *
  19952. * @param array|string $key
  19953. * @param mixed|null $value
  19954. * @return mixed
  19955. * @static
  19956. */
  19957. public static function share($key, $value = null)
  19958. {
  19959. /** @var \Illuminate\View\Factory $instance */
  19960. return $instance->share($key, $value);
  19961. }
  19962. /**
  19963. * Increment the rendering counter.
  19964. *
  19965. * @return void
  19966. * @static
  19967. */
  19968. public static function incrementRender()
  19969. {
  19970. /** @var \Illuminate\View\Factory $instance */
  19971. $instance->incrementRender();
  19972. }
  19973. /**
  19974. * Decrement the rendering counter.
  19975. *
  19976. * @return void
  19977. * @static
  19978. */
  19979. public static function decrementRender()
  19980. {
  19981. /** @var \Illuminate\View\Factory $instance */
  19982. $instance->decrementRender();
  19983. }
  19984. /**
  19985. * Check if there are no active render operations.
  19986. *
  19987. * @return bool
  19988. * @static
  19989. */
  19990. public static function doneRendering()
  19991. {
  19992. /** @var \Illuminate\View\Factory $instance */
  19993. return $instance->doneRendering();
  19994. }
  19995. /**
  19996. * Determine if the given once token has been rendered.
  19997. *
  19998. * @param string $id
  19999. * @return bool
  20000. * @static
  20001. */
  20002. public static function hasRenderedOnce($id)
  20003. {
  20004. /** @var \Illuminate\View\Factory $instance */
  20005. return $instance->hasRenderedOnce($id);
  20006. }
  20007. /**
  20008. * Mark the given once token as having been rendered.
  20009. *
  20010. * @param string $id
  20011. * @return void
  20012. * @static
  20013. */
  20014. public static function markAsRenderedOnce($id)
  20015. {
  20016. /** @var \Illuminate\View\Factory $instance */
  20017. $instance->markAsRenderedOnce($id);
  20018. }
  20019. /**
  20020. * Add a location to the array of view locations.
  20021. *
  20022. * @param string $location
  20023. * @return void
  20024. * @static
  20025. */
  20026. public static function addLocation($location)
  20027. {
  20028. /** @var \Illuminate\View\Factory $instance */
  20029. $instance->addLocation($location);
  20030. }
  20031. /**
  20032. * Prepend a location to the array of view locations.
  20033. *
  20034. * @param string $location
  20035. * @return void
  20036. * @static
  20037. */
  20038. public static function prependLocation($location)
  20039. {
  20040. /** @var \Illuminate\View\Factory $instance */
  20041. $instance->prependLocation($location);
  20042. }
  20043. /**
  20044. * Add a new namespace to the loader.
  20045. *
  20046. * @param string $namespace
  20047. * @param string|array $hints
  20048. * @return \Illuminate\View\Factory
  20049. * @static
  20050. */
  20051. public static function addNamespace($namespace, $hints)
  20052. {
  20053. /** @var \Illuminate\View\Factory $instance */
  20054. return $instance->addNamespace($namespace, $hints);
  20055. }
  20056. /**
  20057. * Prepend a new namespace to the loader.
  20058. *
  20059. * @param string $namespace
  20060. * @param string|array $hints
  20061. * @return \Illuminate\View\Factory
  20062. * @static
  20063. */
  20064. public static function prependNamespace($namespace, $hints)
  20065. {
  20066. /** @var \Illuminate\View\Factory $instance */
  20067. return $instance->prependNamespace($namespace, $hints);
  20068. }
  20069. /**
  20070. * Replace the namespace hints for the given namespace.
  20071. *
  20072. * @param string $namespace
  20073. * @param string|array $hints
  20074. * @return \Illuminate\View\Factory
  20075. * @static
  20076. */
  20077. public static function replaceNamespace($namespace, $hints)
  20078. {
  20079. /** @var \Illuminate\View\Factory $instance */
  20080. return $instance->replaceNamespace($namespace, $hints);
  20081. }
  20082. /**
  20083. * Register a valid view extension and its engine.
  20084. *
  20085. * @param string $extension
  20086. * @param string $engine
  20087. * @param \Closure|null $resolver
  20088. * @return void
  20089. * @static
  20090. */
  20091. public static function addExtension($extension, $engine, $resolver = null)
  20092. {
  20093. /** @var \Illuminate\View\Factory $instance */
  20094. $instance->addExtension($extension, $engine, $resolver);
  20095. }
  20096. /**
  20097. * Flush all of the factory state like sections and stacks.
  20098. *
  20099. * @return void
  20100. * @static
  20101. */
  20102. public static function flushState()
  20103. {
  20104. /** @var \Illuminate\View\Factory $instance */
  20105. $instance->flushState();
  20106. }
  20107. /**
  20108. * Flush all of the section contents if done rendering.
  20109. *
  20110. * @return void
  20111. * @static
  20112. */
  20113. public static function flushStateIfDoneRendering()
  20114. {
  20115. /** @var \Illuminate\View\Factory $instance */
  20116. $instance->flushStateIfDoneRendering();
  20117. }
  20118. /**
  20119. * Get the extension to engine bindings.
  20120. *
  20121. * @return array
  20122. * @static
  20123. */
  20124. public static function getExtensions()
  20125. {
  20126. /** @var \Illuminate\View\Factory $instance */
  20127. return $instance->getExtensions();
  20128. }
  20129. /**
  20130. * Get the engine resolver instance.
  20131. *
  20132. * @return \Illuminate\View\Engines\EngineResolver
  20133. * @static
  20134. */
  20135. public static function getEngineResolver()
  20136. {
  20137. /** @var \Illuminate\View\Factory $instance */
  20138. return $instance->getEngineResolver();
  20139. }
  20140. /**
  20141. * Get the view finder instance.
  20142. *
  20143. * @return \Illuminate\View\ViewFinderInterface
  20144. * @static
  20145. */
  20146. public static function getFinder()
  20147. {
  20148. /** @var \Illuminate\View\Factory $instance */
  20149. return $instance->getFinder();
  20150. }
  20151. /**
  20152. * Set the view finder instance.
  20153. *
  20154. * @param \Illuminate\View\ViewFinderInterface $finder
  20155. * @return void
  20156. * @static
  20157. */
  20158. public static function setFinder($finder)
  20159. {
  20160. /** @var \Illuminate\View\Factory $instance */
  20161. $instance->setFinder($finder);
  20162. }
  20163. /**
  20164. * Flush the cache of views located by the finder.
  20165. *
  20166. * @return void
  20167. * @static
  20168. */
  20169. public static function flushFinderCache()
  20170. {
  20171. /** @var \Illuminate\View\Factory $instance */
  20172. $instance->flushFinderCache();
  20173. }
  20174. /**
  20175. * Get the event dispatcher instance.
  20176. *
  20177. * @return \Illuminate\Contracts\Events\Dispatcher
  20178. * @static
  20179. */
  20180. public static function getDispatcher()
  20181. {
  20182. /** @var \Illuminate\View\Factory $instance */
  20183. return $instance->getDispatcher();
  20184. }
  20185. /**
  20186. * Set the event dispatcher instance.
  20187. *
  20188. * @param \Illuminate\Contracts\Events\Dispatcher $events
  20189. * @return void
  20190. * @static
  20191. */
  20192. public static function setDispatcher($events)
  20193. {
  20194. /** @var \Illuminate\View\Factory $instance */
  20195. $instance->setDispatcher($events);
  20196. }
  20197. /**
  20198. * Get the IoC container instance.
  20199. *
  20200. * @return \Illuminate\Contracts\Container\Container
  20201. * @static
  20202. */
  20203. public static function getContainer()
  20204. {
  20205. /** @var \Illuminate\View\Factory $instance */
  20206. return $instance->getContainer();
  20207. }
  20208. /**
  20209. * Set the IoC container instance.
  20210. *
  20211. * @param \Illuminate\Contracts\Container\Container $container
  20212. * @return void
  20213. * @static
  20214. */
  20215. public static function setContainer($container)
  20216. {
  20217. /** @var \Illuminate\View\Factory $instance */
  20218. $instance->setContainer($container);
  20219. }
  20220. /**
  20221. * Get an item from the shared data.
  20222. *
  20223. * @param string $key
  20224. * @param mixed $default
  20225. * @return mixed
  20226. * @static
  20227. */
  20228. public static function shared($key, $default = null)
  20229. {
  20230. /** @var \Illuminate\View\Factory $instance */
  20231. return $instance->shared($key, $default);
  20232. }
  20233. /**
  20234. * Get all of the shared data for the environment.
  20235. *
  20236. * @return array
  20237. * @static
  20238. */
  20239. public static function getShared()
  20240. {
  20241. /** @var \Illuminate\View\Factory $instance */
  20242. return $instance->getShared();
  20243. }
  20244. /**
  20245. * Register a custom macro.
  20246. *
  20247. * @param string $name
  20248. * @param object|callable $macro
  20249. * @param-closure-this static $macro
  20250. * @return void
  20251. * @static
  20252. */
  20253. public static function macro($name, $macro)
  20254. {
  20255. \Illuminate\View\Factory::macro($name, $macro);
  20256. }
  20257. /**
  20258. * Mix another object into the class.
  20259. *
  20260. * @param object $mixin
  20261. * @param bool $replace
  20262. * @return void
  20263. * @throws \ReflectionException
  20264. * @static
  20265. */
  20266. public static function mixin($mixin, $replace = true)
  20267. {
  20268. \Illuminate\View\Factory::mixin($mixin, $replace);
  20269. }
  20270. /**
  20271. * Checks if macro is registered.
  20272. *
  20273. * @param string $name
  20274. * @return bool
  20275. * @static
  20276. */
  20277. public static function hasMacro($name)
  20278. {
  20279. return \Illuminate\View\Factory::hasMacro($name);
  20280. }
  20281. /**
  20282. * Flush the existing macros.
  20283. *
  20284. * @return void
  20285. * @static
  20286. */
  20287. public static function flushMacros()
  20288. {
  20289. \Illuminate\View\Factory::flushMacros();
  20290. }
  20291. /**
  20292. * Start a component rendering process.
  20293. *
  20294. * @param \Illuminate\Contracts\View\View|\Illuminate\Contracts\Support\Htmlable|\Closure|string $view
  20295. * @param array $data
  20296. * @return void
  20297. * @static
  20298. */
  20299. public static function startComponent($view, $data = [])
  20300. {
  20301. /** @var \Illuminate\View\Factory $instance */
  20302. $instance->startComponent($view, $data);
  20303. }
  20304. /**
  20305. * Get the first view that actually exists from the given list, and start a component.
  20306. *
  20307. * @param array $names
  20308. * @param array $data
  20309. * @return void
  20310. * @static
  20311. */
  20312. public static function startComponentFirst($names, $data = [])
  20313. {
  20314. /** @var \Illuminate\View\Factory $instance */
  20315. $instance->startComponentFirst($names, $data);
  20316. }
  20317. /**
  20318. * Render the current component.
  20319. *
  20320. * @return string
  20321. * @static
  20322. */
  20323. public static function renderComponent()
  20324. {
  20325. /** @var \Illuminate\View\Factory $instance */
  20326. return $instance->renderComponent();
  20327. }
  20328. /**
  20329. * Get an item from the component data that exists above the current component.
  20330. *
  20331. * @param string $key
  20332. * @param mixed $default
  20333. * @return mixed|null
  20334. * @static
  20335. */
  20336. public static function getConsumableComponentData($key, $default = null)
  20337. {
  20338. /** @var \Illuminate\View\Factory $instance */
  20339. return $instance->getConsumableComponentData($key, $default);
  20340. }
  20341. /**
  20342. * Start the slot rendering process.
  20343. *
  20344. * @param string $name
  20345. * @param string|null $content
  20346. * @param array $attributes
  20347. * @return void
  20348. * @static
  20349. */
  20350. public static function slot($name, $content = null, $attributes = [])
  20351. {
  20352. /** @var \Illuminate\View\Factory $instance */
  20353. $instance->slot($name, $content, $attributes);
  20354. }
  20355. /**
  20356. * Save the slot content for rendering.
  20357. *
  20358. * @return void
  20359. * @static
  20360. */
  20361. public static function endSlot()
  20362. {
  20363. /** @var \Illuminate\View\Factory $instance */
  20364. $instance->endSlot();
  20365. }
  20366. /**
  20367. * Register a view creator event.
  20368. *
  20369. * @param array|string $views
  20370. * @param \Closure|string $callback
  20371. * @return array
  20372. * @static
  20373. */
  20374. public static function creator($views, $callback)
  20375. {
  20376. /** @var \Illuminate\View\Factory $instance */
  20377. return $instance->creator($views, $callback);
  20378. }
  20379. /**
  20380. * Register multiple view composers via an array.
  20381. *
  20382. * @param array $composers
  20383. * @return array
  20384. * @static
  20385. */
  20386. public static function composers($composers)
  20387. {
  20388. /** @var \Illuminate\View\Factory $instance */
  20389. return $instance->composers($composers);
  20390. }
  20391. /**
  20392. * Register a view composer event.
  20393. *
  20394. * @param array|string $views
  20395. * @param \Closure|string $callback
  20396. * @return array
  20397. * @static
  20398. */
  20399. public static function composer($views, $callback)
  20400. {
  20401. /** @var \Illuminate\View\Factory $instance */
  20402. return $instance->composer($views, $callback);
  20403. }
  20404. /**
  20405. * Call the composer for a given view.
  20406. *
  20407. * @param \Illuminate\Contracts\View\View $view
  20408. * @return void
  20409. * @static
  20410. */
  20411. public static function callComposer($view)
  20412. {
  20413. /** @var \Illuminate\View\Factory $instance */
  20414. $instance->callComposer($view);
  20415. }
  20416. /**
  20417. * Call the creator for a given view.
  20418. *
  20419. * @param \Illuminate\Contracts\View\View $view
  20420. * @return void
  20421. * @static
  20422. */
  20423. public static function callCreator($view)
  20424. {
  20425. /** @var \Illuminate\View\Factory $instance */
  20426. $instance->callCreator($view);
  20427. }
  20428. /**
  20429. * Start injecting content into a fragment.
  20430. *
  20431. * @param string $fragment
  20432. * @return void
  20433. * @static
  20434. */
  20435. public static function startFragment($fragment)
  20436. {
  20437. /** @var \Illuminate\View\Factory $instance */
  20438. $instance->startFragment($fragment);
  20439. }
  20440. /**
  20441. * Stop injecting content into a fragment.
  20442. *
  20443. * @return string
  20444. * @throws \InvalidArgumentException
  20445. * @static
  20446. */
  20447. public static function stopFragment()
  20448. {
  20449. /** @var \Illuminate\View\Factory $instance */
  20450. return $instance->stopFragment();
  20451. }
  20452. /**
  20453. * Get the contents of a fragment.
  20454. *
  20455. * @param string $name
  20456. * @param string|null $default
  20457. * @return mixed
  20458. * @static
  20459. */
  20460. public static function getFragment($name, $default = null)
  20461. {
  20462. /** @var \Illuminate\View\Factory $instance */
  20463. return $instance->getFragment($name, $default);
  20464. }
  20465. /**
  20466. * Get the entire array of rendered fragments.
  20467. *
  20468. * @return array
  20469. * @static
  20470. */
  20471. public static function getFragments()
  20472. {
  20473. /** @var \Illuminate\View\Factory $instance */
  20474. return $instance->getFragments();
  20475. }
  20476. /**
  20477. * Flush all of the fragments.
  20478. *
  20479. * @return void
  20480. * @static
  20481. */
  20482. public static function flushFragments()
  20483. {
  20484. /** @var \Illuminate\View\Factory $instance */
  20485. $instance->flushFragments();
  20486. }
  20487. /**
  20488. * Start injecting content into a section.
  20489. *
  20490. * @param string $section
  20491. * @param string|null $content
  20492. * @return void
  20493. * @static
  20494. */
  20495. public static function startSection($section, $content = null)
  20496. {
  20497. /** @var \Illuminate\View\Factory $instance */
  20498. $instance->startSection($section, $content);
  20499. }
  20500. /**
  20501. * Inject inline content into a section.
  20502. *
  20503. * @param string $section
  20504. * @param string $content
  20505. * @return void
  20506. * @static
  20507. */
  20508. public static function inject($section, $content)
  20509. {
  20510. /** @var \Illuminate\View\Factory $instance */
  20511. $instance->inject($section, $content);
  20512. }
  20513. /**
  20514. * Stop injecting content into a section and return its contents.
  20515. *
  20516. * @return string
  20517. * @static
  20518. */
  20519. public static function yieldSection()
  20520. {
  20521. /** @var \Illuminate\View\Factory $instance */
  20522. return $instance->yieldSection();
  20523. }
  20524. /**
  20525. * Stop injecting content into a section.
  20526. *
  20527. * @param bool $overwrite
  20528. * @return string
  20529. * @throws \InvalidArgumentException
  20530. * @static
  20531. */
  20532. public static function stopSection($overwrite = false)
  20533. {
  20534. /** @var \Illuminate\View\Factory $instance */
  20535. return $instance->stopSection($overwrite);
  20536. }
  20537. /**
  20538. * Stop injecting content into a section and append it.
  20539. *
  20540. * @return string
  20541. * @throws \InvalidArgumentException
  20542. * @static
  20543. */
  20544. public static function appendSection()
  20545. {
  20546. /** @var \Illuminate\View\Factory $instance */
  20547. return $instance->appendSection();
  20548. }
  20549. /**
  20550. * Get the string contents of a section.
  20551. *
  20552. * @param string $section
  20553. * @param string $default
  20554. * @return string
  20555. * @static
  20556. */
  20557. public static function yieldContent($section, $default = '')
  20558. {
  20559. /** @var \Illuminate\View\Factory $instance */
  20560. return $instance->yieldContent($section, $default);
  20561. }
  20562. /**
  20563. * Get the parent placeholder for the current request.
  20564. *
  20565. * @param string $section
  20566. * @return string
  20567. * @static
  20568. */
  20569. public static function parentPlaceholder($section = '')
  20570. {
  20571. return \Illuminate\View\Factory::parentPlaceholder($section);
  20572. }
  20573. /**
  20574. * Check if section exists.
  20575. *
  20576. * @param string $name
  20577. * @return bool
  20578. * @static
  20579. */
  20580. public static function hasSection($name)
  20581. {
  20582. /** @var \Illuminate\View\Factory $instance */
  20583. return $instance->hasSection($name);
  20584. }
  20585. /**
  20586. * Check if section does not exist.
  20587. *
  20588. * @param string $name
  20589. * @return bool
  20590. * @static
  20591. */
  20592. public static function sectionMissing($name)
  20593. {
  20594. /** @var \Illuminate\View\Factory $instance */
  20595. return $instance->sectionMissing($name);
  20596. }
  20597. /**
  20598. * Get the contents of a section.
  20599. *
  20600. * @param string $name
  20601. * @param string|null $default
  20602. * @return mixed
  20603. * @static
  20604. */
  20605. public static function getSection($name, $default = null)
  20606. {
  20607. /** @var \Illuminate\View\Factory $instance */
  20608. return $instance->getSection($name, $default);
  20609. }
  20610. /**
  20611. * Get the entire array of sections.
  20612. *
  20613. * @return array
  20614. * @static
  20615. */
  20616. public static function getSections()
  20617. {
  20618. /** @var \Illuminate\View\Factory $instance */
  20619. return $instance->getSections();
  20620. }
  20621. /**
  20622. * Flush all of the sections.
  20623. *
  20624. * @return void
  20625. * @static
  20626. */
  20627. public static function flushSections()
  20628. {
  20629. /** @var \Illuminate\View\Factory $instance */
  20630. $instance->flushSections();
  20631. }
  20632. /**
  20633. * Add new loop to the stack.
  20634. *
  20635. * @param \Countable|array $data
  20636. * @return void
  20637. * @static
  20638. */
  20639. public static function addLoop($data)
  20640. {
  20641. /** @var \Illuminate\View\Factory $instance */
  20642. $instance->addLoop($data);
  20643. }
  20644. /**
  20645. * Increment the top loop's indices.
  20646. *
  20647. * @return void
  20648. * @static
  20649. */
  20650. public static function incrementLoopIndices()
  20651. {
  20652. /** @var \Illuminate\View\Factory $instance */
  20653. $instance->incrementLoopIndices();
  20654. }
  20655. /**
  20656. * Pop a loop from the top of the loop stack.
  20657. *
  20658. * @return void
  20659. * @static
  20660. */
  20661. public static function popLoop()
  20662. {
  20663. /** @var \Illuminate\View\Factory $instance */
  20664. $instance->popLoop();
  20665. }
  20666. /**
  20667. * Get an instance of the last loop in the stack.
  20668. *
  20669. * @return \stdClass|null
  20670. * @static
  20671. */
  20672. public static function getLastLoop()
  20673. {
  20674. /** @var \Illuminate\View\Factory $instance */
  20675. return $instance->getLastLoop();
  20676. }
  20677. /**
  20678. * Get the entire loop stack.
  20679. *
  20680. * @return array
  20681. * @static
  20682. */
  20683. public static function getLoopStack()
  20684. {
  20685. /** @var \Illuminate\View\Factory $instance */
  20686. return $instance->getLoopStack();
  20687. }
  20688. /**
  20689. * Start injecting content into a push section.
  20690. *
  20691. * @param string $section
  20692. * @param string $content
  20693. * @return void
  20694. * @static
  20695. */
  20696. public static function startPush($section, $content = '')
  20697. {
  20698. /** @var \Illuminate\View\Factory $instance */
  20699. $instance->startPush($section, $content);
  20700. }
  20701. /**
  20702. * Stop injecting content into a push section.
  20703. *
  20704. * @return string
  20705. * @throws \InvalidArgumentException
  20706. * @static
  20707. */
  20708. public static function stopPush()
  20709. {
  20710. /** @var \Illuminate\View\Factory $instance */
  20711. return $instance->stopPush();
  20712. }
  20713. /**
  20714. * Start prepending content into a push section.
  20715. *
  20716. * @param string $section
  20717. * @param string $content
  20718. * @return void
  20719. * @static
  20720. */
  20721. public static function startPrepend($section, $content = '')
  20722. {
  20723. /** @var \Illuminate\View\Factory $instance */
  20724. $instance->startPrepend($section, $content);
  20725. }
  20726. /**
  20727. * Stop prepending content into a push section.
  20728. *
  20729. * @return string
  20730. * @throws \InvalidArgumentException
  20731. * @static
  20732. */
  20733. public static function stopPrepend()
  20734. {
  20735. /** @var \Illuminate\View\Factory $instance */
  20736. return $instance->stopPrepend();
  20737. }
  20738. /**
  20739. * Get the string contents of a push section.
  20740. *
  20741. * @param string $section
  20742. * @param string $default
  20743. * @return string
  20744. * @static
  20745. */
  20746. public static function yieldPushContent($section, $default = '')
  20747. {
  20748. /** @var \Illuminate\View\Factory $instance */
  20749. return $instance->yieldPushContent($section, $default);
  20750. }
  20751. /**
  20752. * Flush all of the stacks.
  20753. *
  20754. * @return void
  20755. * @static
  20756. */
  20757. public static function flushStacks()
  20758. {
  20759. /** @var \Illuminate\View\Factory $instance */
  20760. $instance->flushStacks();
  20761. }
  20762. /**
  20763. * Start a translation block.
  20764. *
  20765. * @param array $replacements
  20766. * @return void
  20767. * @static
  20768. */
  20769. public static function startTranslation($replacements = [])
  20770. {
  20771. /** @var \Illuminate\View\Factory $instance */
  20772. $instance->startTranslation($replacements);
  20773. }
  20774. /**
  20775. * Render the current translation.
  20776. *
  20777. * @return string
  20778. * @static
  20779. */
  20780. public static function renderTranslation()
  20781. {
  20782. /** @var \Illuminate\View\Factory $instance */
  20783. return $instance->renderTranslation();
  20784. }
  20785. }
  20786. /**
  20787. * @see \Illuminate\Foundation\Vite
  20788. */
  20789. class Vite {
  20790. /**
  20791. * Get the preloaded assets.
  20792. *
  20793. * @return array
  20794. * @static
  20795. */
  20796. public static function preloadedAssets()
  20797. {
  20798. /** @var \Illuminate\Foundation\Vite $instance */
  20799. return $instance->preloadedAssets();
  20800. }
  20801. /**
  20802. * Get the Content Security Policy nonce applied to all generated tags.
  20803. *
  20804. * @return string|null
  20805. * @static
  20806. */
  20807. public static function cspNonce()
  20808. {
  20809. /** @var \Illuminate\Foundation\Vite $instance */
  20810. return $instance->cspNonce();
  20811. }
  20812. /**
  20813. * Generate or set a Content Security Policy nonce to apply to all generated tags.
  20814. *
  20815. * @param string|null $nonce
  20816. * @return string
  20817. * @static
  20818. */
  20819. public static function useCspNonce($nonce = null)
  20820. {
  20821. /** @var \Illuminate\Foundation\Vite $instance */
  20822. return $instance->useCspNonce($nonce);
  20823. }
  20824. /**
  20825. * Use the given key to detect integrity hashes in the manifest.
  20826. *
  20827. * @param string|false $key
  20828. * @return \Illuminate\Foundation\Vite
  20829. * @static
  20830. */
  20831. public static function useIntegrityKey($key)
  20832. {
  20833. /** @var \Illuminate\Foundation\Vite $instance */
  20834. return $instance->useIntegrityKey($key);
  20835. }
  20836. /**
  20837. * Set the Vite entry points.
  20838. *
  20839. * @param array $entryPoints
  20840. * @return \Illuminate\Foundation\Vite
  20841. * @static
  20842. */
  20843. public static function withEntryPoints($entryPoints)
  20844. {
  20845. /** @var \Illuminate\Foundation\Vite $instance */
  20846. return $instance->withEntryPoints($entryPoints);
  20847. }
  20848. /**
  20849. * Merge additional Vite entry points with the current set.
  20850. *
  20851. * @param array $entryPoints
  20852. * @return \Illuminate\Foundation\Vite
  20853. * @static
  20854. */
  20855. public static function mergeEntryPoints($entryPoints)
  20856. {
  20857. /** @var \Illuminate\Foundation\Vite $instance */
  20858. return $instance->mergeEntryPoints($entryPoints);
  20859. }
  20860. /**
  20861. * Set the filename for the manifest file.
  20862. *
  20863. * @param string $filename
  20864. * @return \Illuminate\Foundation\Vite
  20865. * @static
  20866. */
  20867. public static function useManifestFilename($filename)
  20868. {
  20869. /** @var \Illuminate\Foundation\Vite $instance */
  20870. return $instance->useManifestFilename($filename);
  20871. }
  20872. /**
  20873. * Resolve asset paths using the provided resolver.
  20874. *
  20875. * @param callable|null $resolver
  20876. * @return \Illuminate\Foundation\Vite
  20877. * @static
  20878. */
  20879. public static function createAssetPathsUsing($resolver)
  20880. {
  20881. /** @var \Illuminate\Foundation\Vite $instance */
  20882. return $instance->createAssetPathsUsing($resolver);
  20883. }
  20884. /**
  20885. * Get the Vite "hot" file path.
  20886. *
  20887. * @return string
  20888. * @static
  20889. */
  20890. public static function hotFile()
  20891. {
  20892. /** @var \Illuminate\Foundation\Vite $instance */
  20893. return $instance->hotFile();
  20894. }
  20895. /**
  20896. * Set the Vite "hot" file path.
  20897. *
  20898. * @param string $path
  20899. * @return \Illuminate\Foundation\Vite
  20900. * @static
  20901. */
  20902. public static function useHotFile($path)
  20903. {
  20904. /** @var \Illuminate\Foundation\Vite $instance */
  20905. return $instance->useHotFile($path);
  20906. }
  20907. /**
  20908. * Set the Vite build directory.
  20909. *
  20910. * @param string $path
  20911. * @return \Illuminate\Foundation\Vite
  20912. * @static
  20913. */
  20914. public static function useBuildDirectory($path)
  20915. {
  20916. /** @var \Illuminate\Foundation\Vite $instance */
  20917. return $instance->useBuildDirectory($path);
  20918. }
  20919. /**
  20920. * Use the given callback to resolve attributes for script tags.
  20921. *
  20922. * @param (callable(string, string, ?array, ?array): array)|array $attributes
  20923. * @return \Illuminate\Foundation\Vite
  20924. * @static
  20925. */
  20926. public static function useScriptTagAttributes($attributes)
  20927. {
  20928. /** @var \Illuminate\Foundation\Vite $instance */
  20929. return $instance->useScriptTagAttributes($attributes);
  20930. }
  20931. /**
  20932. * Use the given callback to resolve attributes for style tags.
  20933. *
  20934. * @param (callable(string, string, ?array, ?array): array)|array $attributes
  20935. * @return \Illuminate\Foundation\Vite
  20936. * @static
  20937. */
  20938. public static function useStyleTagAttributes($attributes)
  20939. {
  20940. /** @var \Illuminate\Foundation\Vite $instance */
  20941. return $instance->useStyleTagAttributes($attributes);
  20942. }
  20943. /**
  20944. * Use the given callback to resolve attributes for preload tags.
  20945. *
  20946. * @param (callable(string, string, ?array, ?array): (array|false))|array|false $attributes
  20947. * @return \Illuminate\Foundation\Vite
  20948. * @static
  20949. */
  20950. public static function usePreloadTagAttributes($attributes)
  20951. {
  20952. /** @var \Illuminate\Foundation\Vite $instance */
  20953. return $instance->usePreloadTagAttributes($attributes);
  20954. }
  20955. /**
  20956. * Eagerly prefetch assets.
  20957. *
  20958. * @param int|null $concurrency
  20959. * @param string $event
  20960. * @return \Illuminate\Foundation\Vite
  20961. * @static
  20962. */
  20963. public static function prefetch($concurrency = null, $event = 'load')
  20964. {
  20965. /** @var \Illuminate\Foundation\Vite $instance */
  20966. return $instance->prefetch($concurrency, $event);
  20967. }
  20968. /**
  20969. * Use the "waterfall" prefetching strategy.
  20970. *
  20971. * @return \Illuminate\Foundation\Vite
  20972. * @static
  20973. */
  20974. public static function useWaterfallPrefetching($concurrency = null)
  20975. {
  20976. /** @var \Illuminate\Foundation\Vite $instance */
  20977. return $instance->useWaterfallPrefetching($concurrency);
  20978. }
  20979. /**
  20980. * Use the "aggressive" prefetching strategy.
  20981. *
  20982. * @return \Illuminate\Foundation\Vite
  20983. * @static
  20984. */
  20985. public static function useAggressivePrefetching()
  20986. {
  20987. /** @var \Illuminate\Foundation\Vite $instance */
  20988. return $instance->useAggressivePrefetching();
  20989. }
  20990. /**
  20991. * Set the prefetching strategy.
  20992. *
  20993. * @param 'waterfall'|'aggressive'|null $strategy
  20994. * @param array $config
  20995. * @return \Illuminate\Foundation\Vite
  20996. * @static
  20997. */
  20998. public static function usePrefetchStrategy($strategy, $config = [])
  20999. {
  21000. /** @var \Illuminate\Foundation\Vite $instance */
  21001. return $instance->usePrefetchStrategy($strategy, $config);
  21002. }
  21003. /**
  21004. * Generate React refresh runtime script.
  21005. *
  21006. * @return \Illuminate\Support\HtmlString|void
  21007. * @static
  21008. */
  21009. public static function reactRefresh()
  21010. {
  21011. /** @var \Illuminate\Foundation\Vite $instance */
  21012. return $instance->reactRefresh();
  21013. }
  21014. /**
  21015. * Get the URL for an asset.
  21016. *
  21017. * @param string $asset
  21018. * @param string|null $buildDirectory
  21019. * @return string
  21020. * @static
  21021. */
  21022. public static function asset($asset, $buildDirectory = null)
  21023. {
  21024. /** @var \Illuminate\Foundation\Vite $instance */
  21025. return $instance->asset($asset, $buildDirectory);
  21026. }
  21027. /**
  21028. * Get the content of a given asset.
  21029. *
  21030. * @param string $asset
  21031. * @param string|null $buildDirectory
  21032. * @return string
  21033. * @throws \Illuminate\Foundation\ViteException
  21034. * @static
  21035. */
  21036. public static function content($asset, $buildDirectory = null)
  21037. {
  21038. /** @var \Illuminate\Foundation\Vite $instance */
  21039. return $instance->content($asset, $buildDirectory);
  21040. }
  21041. /**
  21042. * Get a unique hash representing the current manifest, or null if there is no manifest.
  21043. *
  21044. * @param string|null $buildDirectory
  21045. * @return string|null
  21046. * @static
  21047. */
  21048. public static function manifestHash($buildDirectory = null)
  21049. {
  21050. /** @var \Illuminate\Foundation\Vite $instance */
  21051. return $instance->manifestHash($buildDirectory);
  21052. }
  21053. /**
  21054. * Determine if the HMR server is running.
  21055. *
  21056. * @return bool
  21057. * @static
  21058. */
  21059. public static function isRunningHot()
  21060. {
  21061. /** @var \Illuminate\Foundation\Vite $instance */
  21062. return $instance->isRunningHot();
  21063. }
  21064. /**
  21065. * Get the Vite tag content as a string of HTML.
  21066. *
  21067. * @return string
  21068. * @static
  21069. */
  21070. public static function toHtml()
  21071. {
  21072. /** @var \Illuminate\Foundation\Vite $instance */
  21073. return $instance->toHtml();
  21074. }
  21075. /**
  21076. * Flush state.
  21077. *
  21078. * @return void
  21079. * @static
  21080. */
  21081. public static function flush()
  21082. {
  21083. /** @var \Illuminate\Foundation\Vite $instance */
  21084. $instance->flush();
  21085. }
  21086. /**
  21087. * Register a custom macro.
  21088. *
  21089. * @param string $name
  21090. * @param object|callable $macro
  21091. * @param-closure-this static $macro
  21092. * @return void
  21093. * @static
  21094. */
  21095. public static function macro($name, $macro)
  21096. {
  21097. \Illuminate\Foundation\Vite::macro($name, $macro);
  21098. }
  21099. /**
  21100. * Mix another object into the class.
  21101. *
  21102. * @param object $mixin
  21103. * @param bool $replace
  21104. * @return void
  21105. * @throws \ReflectionException
  21106. * @static
  21107. */
  21108. public static function mixin($mixin, $replace = true)
  21109. {
  21110. \Illuminate\Foundation\Vite::mixin($mixin, $replace);
  21111. }
  21112. /**
  21113. * Checks if macro is registered.
  21114. *
  21115. * @param string $name
  21116. * @return bool
  21117. * @static
  21118. */
  21119. public static function hasMacro($name)
  21120. {
  21121. return \Illuminate\Foundation\Vite::hasMacro($name);
  21122. }
  21123. /**
  21124. * Flush the existing macros.
  21125. *
  21126. * @return void
  21127. * @static
  21128. */
  21129. public static function flushMacros()
  21130. {
  21131. \Illuminate\Foundation\Vite::flushMacros();
  21132. }
  21133. }
  21134. }
  21135. namespace Kreait\Laravel\Firebase\Facades {
  21136. /**
  21137. * @method static AppCheck appCheck()
  21138. * @method static Auth auth()
  21139. * @method static Database database()
  21140. * @method static Firestore firestore()
  21141. * @method static Messaging messaging()
  21142. * @method static RemoteConfig remoteConfig()
  21143. * @method static Storage storage()
  21144. * @see FirebaseProjectManager
  21145. * @see FirebaseProject
  21146. */
  21147. class Firebase {
  21148. /**
  21149. * @static
  21150. */
  21151. public static function project($name = null)
  21152. {
  21153. /** @var \Kreait\Laravel\Firebase\FirebaseProjectManager $instance */
  21154. return $instance->project($name);
  21155. }
  21156. /**
  21157. * @static
  21158. */
  21159. public static function getDefaultProject()
  21160. {
  21161. /** @var \Kreait\Laravel\Firebase\FirebaseProjectManager $instance */
  21162. return $instance->getDefaultProject();
  21163. }
  21164. /**
  21165. * @static
  21166. */
  21167. public static function setDefaultProject($name)
  21168. {
  21169. /** @var \Kreait\Laravel\Firebase\FirebaseProjectManager $instance */
  21170. return $instance->setDefaultProject($name);
  21171. }
  21172. }
  21173. }
  21174. namespace Illuminate\Http {
  21175. /**
  21176. */
  21177. class Request extends \Symfony\Component\HttpFoundation\Request {
  21178. /**
  21179. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  21180. * @param array $rules
  21181. * @param mixed $params
  21182. * @static
  21183. */
  21184. public static function validate($rules, ...$params)
  21185. {
  21186. return \Illuminate\Http\Request::validate($rules, ...$params);
  21187. }
  21188. /**
  21189. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  21190. * @param string $errorBag
  21191. * @param array $rules
  21192. * @param mixed $params
  21193. * @static
  21194. */
  21195. public static function validateWithBag($errorBag, $rules, ...$params)
  21196. {
  21197. return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params);
  21198. }
  21199. /**
  21200. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21201. * @param mixed $absolute
  21202. * @static
  21203. */
  21204. public static function hasValidSignature($absolute = true)
  21205. {
  21206. return \Illuminate\Http\Request::hasValidSignature($absolute);
  21207. }
  21208. /**
  21209. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21210. * @static
  21211. */
  21212. public static function hasValidRelativeSignature()
  21213. {
  21214. return \Illuminate\Http\Request::hasValidRelativeSignature();
  21215. }
  21216. /**
  21217. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21218. * @param mixed $ignoreQuery
  21219. * @param mixed $absolute
  21220. * @static
  21221. */
  21222. public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true)
  21223. {
  21224. return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute);
  21225. }
  21226. /**
  21227. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21228. * @param mixed $ignoreQuery
  21229. * @static
  21230. */
  21231. public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = [])
  21232. {
  21233. return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery);
  21234. }
  21235. }
  21236. }
  21237. namespace Illuminate\Database\Schema {
  21238. /**
  21239. */
  21240. class Blueprint {
  21241. /**
  21242. * @see \Kalnoy\Nestedset\NestedSetServiceProvider::register()
  21243. * @static
  21244. */
  21245. public static function nestedSet()
  21246. {
  21247. return \Illuminate\Database\Schema\Blueprint::nestedSet();
  21248. }
  21249. /**
  21250. * @see \Kalnoy\Nestedset\NestedSetServiceProvider::register()
  21251. * @static
  21252. */
  21253. public static function dropNestedSet()
  21254. {
  21255. return \Illuminate\Database\Schema\Blueprint::dropNestedSet();
  21256. }
  21257. }
  21258. }
  21259. namespace {
  21260. class App extends \Illuminate\Support\Facades\App {}
  21261. class Arr extends \Illuminate\Support\Arr {}
  21262. class Artisan extends \Illuminate\Support\Facades\Artisan {}
  21263. class Auth extends \Illuminate\Support\Facades\Auth {}
  21264. class Blade extends \Illuminate\Support\Facades\Blade {}
  21265. class Broadcast extends \Illuminate\Support\Facades\Broadcast {}
  21266. class Bus extends \Illuminate\Support\Facades\Bus {}
  21267. class Cache extends \Illuminate\Support\Facades\Cache {}
  21268. class Concurrency extends \Illuminate\Support\Facades\Concurrency {}
  21269. class Config extends \Illuminate\Support\Facades\Config {}
  21270. class Context extends \Illuminate\Support\Facades\Context {}
  21271. class Cookie extends \Illuminate\Support\Facades\Cookie {}
  21272. class Crypt extends \Illuminate\Support\Facades\Crypt {}
  21273. class Date extends \Illuminate\Support\Facades\Date {}
  21274. class DB extends \Illuminate\Support\Facades\DB {}
  21275. /**
  21276. * @template TCollection of static
  21277. * @template TModel of static
  21278. * @template TValue of static
  21279. * @template TValue of static
  21280. */
  21281. class Eloquent extends \Illuminate\Database\Eloquent\Model { /**
  21282. * Create and return an un-saved model instance.
  21283. *
  21284. * @param array $attributes
  21285. * @return TModel
  21286. * @static
  21287. */
  21288. public static function make($attributes = [])
  21289. {
  21290. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21291. return $instance->make($attributes);
  21292. }
  21293. /**
  21294. * Register a new global scope.
  21295. *
  21296. * @param string $identifier
  21297. * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope
  21298. * @return \Illuminate\Database\Eloquent\Builder<static>
  21299. * @static
  21300. */
  21301. public static function withGlobalScope($identifier, $scope)
  21302. {
  21303. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21304. return $instance->withGlobalScope($identifier, $scope);
  21305. }
  21306. /**
  21307. * Remove a registered global scope.
  21308. *
  21309. * @param \Illuminate\Database\Eloquent\Scope|string $scope
  21310. * @return \Illuminate\Database\Eloquent\Builder<static>
  21311. * @static
  21312. */
  21313. public static function withoutGlobalScope($scope)
  21314. {
  21315. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21316. return $instance->withoutGlobalScope($scope);
  21317. }
  21318. /**
  21319. * Remove all or passed registered global scopes.
  21320. *
  21321. * @param array|null $scopes
  21322. * @return \Illuminate\Database\Eloquent\Builder<static>
  21323. * @static
  21324. */
  21325. public static function withoutGlobalScopes($scopes = null)
  21326. {
  21327. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21328. return $instance->withoutGlobalScopes($scopes);
  21329. }
  21330. /**
  21331. * Get an array of global scopes that were removed from the query.
  21332. *
  21333. * @return array
  21334. * @static
  21335. */
  21336. public static function removedScopes()
  21337. {
  21338. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21339. return $instance->removedScopes();
  21340. }
  21341. /**
  21342. * Add a where clause on the primary key to the query.
  21343. *
  21344. * @param mixed $id
  21345. * @return \Illuminate\Database\Eloquent\Builder<static>
  21346. * @static
  21347. */
  21348. public static function whereKey($id)
  21349. {
  21350. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21351. return $instance->whereKey($id);
  21352. }
  21353. /**
  21354. * Add a where clause on the primary key to the query.
  21355. *
  21356. * @param mixed $id
  21357. * @return \Illuminate\Database\Eloquent\Builder<static>
  21358. * @static
  21359. */
  21360. public static function whereKeyNot($id)
  21361. {
  21362. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21363. return $instance->whereKeyNot($id);
  21364. }
  21365. /**
  21366. * Add a basic where clause to the query.
  21367. *
  21368. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21369. * @param mixed $operator
  21370. * @param mixed $value
  21371. * @param string $boolean
  21372. * @return \Illuminate\Database\Eloquent\Builder<static>
  21373. * @static
  21374. */
  21375. public static function where($column, $operator = null, $value = null, $boolean = 'and')
  21376. {
  21377. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21378. return $instance->where($column, $operator, $value, $boolean);
  21379. }
  21380. /**
  21381. * Add a basic where clause to the query, and return the first result.
  21382. *
  21383. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21384. * @param mixed $operator
  21385. * @param mixed $value
  21386. * @param string $boolean
  21387. * @return TModel|null
  21388. * @static
  21389. */
  21390. public static function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
  21391. {
  21392. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21393. return $instance->firstWhere($column, $operator, $value, $boolean);
  21394. }
  21395. /**
  21396. * Add an "or where" clause to the query.
  21397. *
  21398. * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column
  21399. * @param mixed $operator
  21400. * @param mixed $value
  21401. * @return \Illuminate\Database\Eloquent\Builder<static>
  21402. * @static
  21403. */
  21404. public static function orWhere($column, $operator = null, $value = null)
  21405. {
  21406. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21407. return $instance->orWhere($column, $operator, $value);
  21408. }
  21409. /**
  21410. * Add a basic "where not" clause to the query.
  21411. *
  21412. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21413. * @param mixed $operator
  21414. * @param mixed $value
  21415. * @param string $boolean
  21416. * @return \Illuminate\Database\Eloquent\Builder<static>
  21417. * @static
  21418. */
  21419. public static function whereNot($column, $operator = null, $value = null, $boolean = 'and')
  21420. {
  21421. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21422. return $instance->whereNot($column, $operator, $value, $boolean);
  21423. }
  21424. /**
  21425. * Add an "or where not" clause to the query.
  21426. *
  21427. * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column
  21428. * @param mixed $operator
  21429. * @param mixed $value
  21430. * @return \Illuminate\Database\Eloquent\Builder<static>
  21431. * @static
  21432. */
  21433. public static function orWhereNot($column, $operator = null, $value = null)
  21434. {
  21435. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21436. return $instance->orWhereNot($column, $operator, $value);
  21437. }
  21438. /**
  21439. * Add an "order by" clause for a timestamp to the query.
  21440. *
  21441. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21442. * @return \Illuminate\Database\Eloquent\Builder<static>
  21443. * @static
  21444. */
  21445. public static function latest($column = null)
  21446. {
  21447. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21448. return $instance->latest($column);
  21449. }
  21450. /**
  21451. * Add an "order by" clause for a timestamp to the query.
  21452. *
  21453. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21454. * @return \Illuminate\Database\Eloquent\Builder<static>
  21455. * @static
  21456. */
  21457. public static function oldest($column = null)
  21458. {
  21459. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21460. return $instance->oldest($column);
  21461. }
  21462. /**
  21463. * Create a collection of models from plain arrays.
  21464. *
  21465. * @param array $items
  21466. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21467. * @static
  21468. */
  21469. public static function hydrate($items)
  21470. {
  21471. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21472. return $instance->hydrate($items);
  21473. }
  21474. /**
  21475. * Insert into the database after merging the model's default attributes, setting timestamps, and casting values.
  21476. *
  21477. * @param array<int, array<string, mixed>> $values
  21478. * @return bool
  21479. * @static
  21480. */
  21481. public static function fillAndInsert($values)
  21482. {
  21483. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21484. return $instance->fillAndInsert($values);
  21485. }
  21486. /**
  21487. * Insert (ignoring errors) into the database after merging the model's default attributes, setting timestamps, and casting values.
  21488. *
  21489. * @param array<int, array<string, mixed>> $values
  21490. * @return int
  21491. * @static
  21492. */
  21493. public static function fillAndInsertOrIgnore($values)
  21494. {
  21495. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21496. return $instance->fillAndInsertOrIgnore($values);
  21497. }
  21498. /**
  21499. * Insert a record into the database and get its ID after merging the model's default attributes, setting timestamps, and casting values.
  21500. *
  21501. * @param array<string, mixed> $values
  21502. * @return int
  21503. * @static
  21504. */
  21505. public static function fillAndInsertGetId($values)
  21506. {
  21507. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21508. return $instance->fillAndInsertGetId($values);
  21509. }
  21510. /**
  21511. * Enrich the given values by merging in the model's default attributes, adding timestamps, and casting values.
  21512. *
  21513. * @param array<int, array<string, mixed>> $values
  21514. * @return array<int, array<string, mixed>>
  21515. * @static
  21516. */
  21517. public static function fillForInsert($values)
  21518. {
  21519. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21520. return $instance->fillForInsert($values);
  21521. }
  21522. /**
  21523. * Create a collection of models from a raw query.
  21524. *
  21525. * @param string $query
  21526. * @param array $bindings
  21527. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21528. * @static
  21529. */
  21530. public static function fromQuery($query, $bindings = [])
  21531. {
  21532. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21533. return $instance->fromQuery($query, $bindings);
  21534. }
  21535. /**
  21536. * Find a model by its primary key.
  21537. *
  21538. * @param mixed $id
  21539. * @param array|string $columns
  21540. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel|null)
  21541. * @static
  21542. */
  21543. public static function find($id, $columns = [])
  21544. {
  21545. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21546. return $instance->find($id, $columns);
  21547. }
  21548. /**
  21549. * Find a sole model by its primary key.
  21550. *
  21551. * @param mixed $id
  21552. * @param array|string $columns
  21553. * @return TModel
  21554. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21555. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21556. * @static
  21557. */
  21558. public static function findSole($id, $columns = [])
  21559. {
  21560. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21561. return $instance->findSole($id, $columns);
  21562. }
  21563. /**
  21564. * Find multiple models by their primary keys.
  21565. *
  21566. * @param \Illuminate\Contracts\Support\Arrayable|array $ids
  21567. * @param array|string $columns
  21568. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21569. * @static
  21570. */
  21571. public static function findMany($ids, $columns = [])
  21572. {
  21573. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21574. return $instance->findMany($ids, $columns);
  21575. }
  21576. /**
  21577. * Find a model by its primary key or throw an exception.
  21578. *
  21579. * @param mixed $id
  21580. * @param array|string $columns
  21581. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel)
  21582. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21583. * @static
  21584. */
  21585. public static function findOrFail($id, $columns = [])
  21586. {
  21587. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21588. return $instance->findOrFail($id, $columns);
  21589. }
  21590. /**
  21591. * Find a model by its primary key or return fresh model instance.
  21592. *
  21593. * @param mixed $id
  21594. * @param array|string $columns
  21595. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel)
  21596. * @static
  21597. */
  21598. public static function findOrNew($id, $columns = [])
  21599. {
  21600. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21601. return $instance->findOrNew($id, $columns);
  21602. }
  21603. /**
  21604. * Find a model by its primary key or call a callback.
  21605. *
  21606. * @template TValue
  21607. * @param mixed $id
  21608. * @param (\Closure(): TValue)|list<string>|string $columns
  21609. * @param (\Closure(): TValue)|null $callback
  21610. * @return ( $id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>)
  21611. * ? \Illuminate\Database\Eloquent\Collection<int, TModel>
  21612. * : TModel|TValue
  21613. * )
  21614. * @static
  21615. */
  21616. public static function findOr($id, $columns = [], $callback = null)
  21617. {
  21618. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21619. return $instance->findOr($id, $columns, $callback);
  21620. }
  21621. /**
  21622. * Get the first record matching the attributes or instantiate it.
  21623. *
  21624. * @param array $attributes
  21625. * @param array $values
  21626. * @return TModel
  21627. * @static
  21628. */
  21629. public static function firstOrNew($attributes = [], $values = [])
  21630. {
  21631. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21632. return $instance->firstOrNew($attributes, $values);
  21633. }
  21634. /**
  21635. * Get the first record matching the attributes. If the record is not found, create it.
  21636. *
  21637. * @param array $attributes
  21638. * @param array $values
  21639. * @return TModel
  21640. * @static
  21641. */
  21642. public static function firstOrCreate($attributes = [], $values = [])
  21643. {
  21644. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21645. return $instance->firstOrCreate($attributes, $values);
  21646. }
  21647. /**
  21648. * Attempt to create the record. If a unique constraint violation occurs, attempt to find the matching record.
  21649. *
  21650. * @param array $attributes
  21651. * @param array $values
  21652. * @return TModel
  21653. * @static
  21654. */
  21655. public static function createOrFirst($attributes = [], $values = [])
  21656. {
  21657. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21658. return $instance->createOrFirst($attributes, $values);
  21659. }
  21660. /**
  21661. * Create or update a record matching the attributes, and fill it with values.
  21662. *
  21663. * @param array $attributes
  21664. * @param array $values
  21665. * @return TModel
  21666. * @static
  21667. */
  21668. public static function updateOrCreate($attributes, $values = [])
  21669. {
  21670. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21671. return $instance->updateOrCreate($attributes, $values);
  21672. }
  21673. /**
  21674. * Create a record matching the attributes, or increment the existing record.
  21675. *
  21676. * @param array $attributes
  21677. * @param string $column
  21678. * @param int|float $default
  21679. * @param int|float $step
  21680. * @param array $extra
  21681. * @return TModel
  21682. * @static
  21683. */
  21684. public static function incrementOrCreate($attributes, $column = 'count', $default = 1, $step = 1, $extra = [])
  21685. {
  21686. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21687. return $instance->incrementOrCreate($attributes, $column, $default, $step, $extra);
  21688. }
  21689. /**
  21690. * Execute the query and get the first result or throw an exception.
  21691. *
  21692. * @param array|string $columns
  21693. * @return TModel
  21694. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21695. * @static
  21696. */
  21697. public static function firstOrFail($columns = [])
  21698. {
  21699. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21700. return $instance->firstOrFail($columns);
  21701. }
  21702. /**
  21703. * Execute the query and get the first result or call a callback.
  21704. *
  21705. * @template TValue
  21706. * @param (\Closure(): TValue)|list<string> $columns
  21707. * @param (\Closure(): TValue)|null $callback
  21708. * @return TModel|TValue
  21709. * @static
  21710. */
  21711. public static function firstOr($columns = [], $callback = null)
  21712. {
  21713. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21714. return $instance->firstOr($columns, $callback);
  21715. }
  21716. /**
  21717. * Execute the query and get the first result if it's the sole matching record.
  21718. *
  21719. * @param array|string $columns
  21720. * @return TModel
  21721. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21722. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21723. * @static
  21724. */
  21725. public static function sole($columns = [])
  21726. {
  21727. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21728. return $instance->sole($columns);
  21729. }
  21730. /**
  21731. * Get a single column's value from the first result of a query.
  21732. *
  21733. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21734. * @return mixed
  21735. * @static
  21736. */
  21737. public static function value($column)
  21738. {
  21739. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21740. return $instance->value($column);
  21741. }
  21742. /**
  21743. * Get a single column's value from the first result of a query if it's the sole matching record.
  21744. *
  21745. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21746. * @return mixed
  21747. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21748. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21749. * @static
  21750. */
  21751. public static function soleValue($column)
  21752. {
  21753. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21754. return $instance->soleValue($column);
  21755. }
  21756. /**
  21757. * Get a single column's value from the first result of the query or throw an exception.
  21758. *
  21759. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21760. * @return mixed
  21761. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21762. * @static
  21763. */
  21764. public static function valueOrFail($column)
  21765. {
  21766. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21767. return $instance->valueOrFail($column);
  21768. }
  21769. /**
  21770. * Execute the query as a "select" statement.
  21771. *
  21772. * @param array|string $columns
  21773. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21774. * @static
  21775. */
  21776. public static function get($columns = [])
  21777. {
  21778. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21779. return $instance->get($columns);
  21780. }
  21781. /**
  21782. * Get the hydrated models without eager loading.
  21783. *
  21784. * @param array|string $columns
  21785. * @return array<int, TModel>
  21786. * @static
  21787. */
  21788. public static function getModels($columns = [])
  21789. {
  21790. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21791. return $instance->getModels($columns);
  21792. }
  21793. /**
  21794. * Eager load the relationships for the models.
  21795. *
  21796. * @param array<int, TModel> $models
  21797. * @return array<int, TModel>
  21798. * @static
  21799. */
  21800. public static function eagerLoadRelations($models)
  21801. {
  21802. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21803. return $instance->eagerLoadRelations($models);
  21804. }
  21805. /**
  21806. * Register a closure to be invoked after the query is executed.
  21807. *
  21808. * @param \Closure $callback
  21809. * @return \Illuminate\Database\Eloquent\Builder<static>
  21810. * @static
  21811. */
  21812. public static function afterQuery($callback)
  21813. {
  21814. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21815. return $instance->afterQuery($callback);
  21816. }
  21817. /**
  21818. * Invoke the "after query" modification callbacks.
  21819. *
  21820. * @param mixed $result
  21821. * @return mixed
  21822. * @static
  21823. */
  21824. public static function applyAfterQueryCallbacks($result)
  21825. {
  21826. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21827. return $instance->applyAfterQueryCallbacks($result);
  21828. }
  21829. /**
  21830. * Get a lazy collection for the given query.
  21831. *
  21832. * @return \Illuminate\Support\LazyCollection<int, TModel>
  21833. * @static
  21834. */
  21835. public static function cursor()
  21836. {
  21837. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21838. return $instance->cursor();
  21839. }
  21840. /**
  21841. * Get a collection with the values of a given column.
  21842. *
  21843. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21844. * @param string|null $key
  21845. * @return \Illuminate\Support\Collection<array-key, mixed>
  21846. * @static
  21847. */
  21848. public static function pluck($column, $key = null)
  21849. {
  21850. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21851. return $instance->pluck($column, $key);
  21852. }
  21853. /**
  21854. * Paginate the given query.
  21855. *
  21856. * @param int|null|\Closure $perPage
  21857. * @param array|string $columns
  21858. * @param string $pageName
  21859. * @param int|null $page
  21860. * @param \Closure|int|null $total
  21861. * @return \Illuminate\Pagination\LengthAwarePaginator
  21862. * @throws \InvalidArgumentException
  21863. * @static
  21864. */
  21865. public static function paginate($perPage = null, $columns = [], $pageName = 'page', $page = null, $total = null)
  21866. {
  21867. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21868. return $instance->paginate($perPage, $columns, $pageName, $page, $total);
  21869. }
  21870. /**
  21871. * Paginate the given query into a simple paginator.
  21872. *
  21873. * @param int|null $perPage
  21874. * @param array|string $columns
  21875. * @param string $pageName
  21876. * @param int|null $page
  21877. * @return \Illuminate\Contracts\Pagination\Paginator
  21878. * @static
  21879. */
  21880. public static function simplePaginate($perPage = null, $columns = [], $pageName = 'page', $page = null)
  21881. {
  21882. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21883. return $instance->simplePaginate($perPage, $columns, $pageName, $page);
  21884. }
  21885. /**
  21886. * Paginate the given query into a cursor paginator.
  21887. *
  21888. * @param int|null $perPage
  21889. * @param array|string $columns
  21890. * @param string $cursorName
  21891. * @param \Illuminate\Pagination\Cursor|string|null $cursor
  21892. * @return \Illuminate\Contracts\Pagination\CursorPaginator
  21893. * @static
  21894. */
  21895. public static function cursorPaginate($perPage = null, $columns = [], $cursorName = 'cursor', $cursor = null)
  21896. {
  21897. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21898. return $instance->cursorPaginate($perPage, $columns, $cursorName, $cursor);
  21899. }
  21900. /**
  21901. * Save a new model and return the instance.
  21902. *
  21903. * @param array $attributes
  21904. * @return TModel
  21905. * @static
  21906. */
  21907. public static function create($attributes = [])
  21908. {
  21909. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21910. return $instance->create($attributes);
  21911. }
  21912. /**
  21913. * Save a new model and return the instance without raising model events.
  21914. *
  21915. * @param array $attributes
  21916. * @return TModel
  21917. * @static
  21918. */
  21919. public static function createQuietly($attributes = [])
  21920. {
  21921. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21922. return $instance->createQuietly($attributes);
  21923. }
  21924. /**
  21925. * Save a new model and return the instance. Allow mass-assignment.
  21926. *
  21927. * @param array $attributes
  21928. * @return TModel
  21929. * @static
  21930. */
  21931. public static function forceCreate($attributes)
  21932. {
  21933. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21934. return $instance->forceCreate($attributes);
  21935. }
  21936. /**
  21937. * Save a new model instance with mass assignment without raising model events.
  21938. *
  21939. * @param array $attributes
  21940. * @return TModel
  21941. * @static
  21942. */
  21943. public static function forceCreateQuietly($attributes = [])
  21944. {
  21945. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21946. return $instance->forceCreateQuietly($attributes);
  21947. }
  21948. /**
  21949. * Insert new records or update the existing ones.
  21950. *
  21951. * @param array $values
  21952. * @param array|string $uniqueBy
  21953. * @param array|null $update
  21954. * @return int
  21955. * @static
  21956. */
  21957. public static function upsert($values, $uniqueBy, $update = null)
  21958. {
  21959. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21960. return $instance->upsert($values, $uniqueBy, $update);
  21961. }
  21962. /**
  21963. * Register a replacement for the default delete function.
  21964. *
  21965. * @param \Closure $callback
  21966. * @return void
  21967. * @static
  21968. */
  21969. public static function onDelete($callback)
  21970. {
  21971. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21972. $instance->onDelete($callback);
  21973. }
  21974. /**
  21975. * Call the given local model scopes.
  21976. *
  21977. * @param array|string $scopes
  21978. * @return static|mixed
  21979. * @static
  21980. */
  21981. public static function scopes($scopes)
  21982. {
  21983. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21984. return $instance->scopes($scopes);
  21985. }
  21986. /**
  21987. * Apply the scopes to the Eloquent builder instance and return it.
  21988. *
  21989. * @return static
  21990. * @static
  21991. */
  21992. public static function applyScopes()
  21993. {
  21994. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21995. return $instance->applyScopes();
  21996. }
  21997. /**
  21998. * Prevent the specified relations from being eager loaded.
  21999. *
  22000. * @param mixed $relations
  22001. * @return \Illuminate\Database\Eloquent\Builder<static>
  22002. * @static
  22003. */
  22004. public static function without($relations)
  22005. {
  22006. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22007. return $instance->without($relations);
  22008. }
  22009. /**
  22010. * Set the relationships that should be eager loaded while removing any previously added eager loading specifications.
  22011. *
  22012. * @param array<array-key, array|(\Closure(\Illuminate\Database\Eloquent\Relations\Relation<*,*,*>): mixed)|string>|string $relations
  22013. * @return \Illuminate\Database\Eloquent\Builder<static>
  22014. * @static
  22015. */
  22016. public static function withOnly($relations)
  22017. {
  22018. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22019. return $instance->withOnly($relations);
  22020. }
  22021. /**
  22022. * Create a new instance of the model being queried.
  22023. *
  22024. * @param array $attributes
  22025. * @return TModel
  22026. * @static
  22027. */
  22028. public static function newModelInstance($attributes = [])
  22029. {
  22030. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22031. return $instance->newModelInstance($attributes);
  22032. }
  22033. /**
  22034. * Specify attributes that should be added to any new models created by this builder.
  22035. *
  22036. * The given key / value pairs will also be added as where conditions to the query.
  22037. *
  22038. * @param \Illuminate\Contracts\Database\Query\Expression|array|string $attributes
  22039. * @param mixed $value
  22040. * @param bool $asConditions
  22041. * @return \Illuminate\Database\Eloquent\Builder<static>
  22042. * @static
  22043. */
  22044. public static function withAttributes($attributes, $value = null, $asConditions = true)
  22045. {
  22046. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22047. return $instance->withAttributes($attributes, $value, $asConditions);
  22048. }
  22049. /**
  22050. * Apply query-time casts to the model instance.
  22051. *
  22052. * @param array $casts
  22053. * @return \Illuminate\Database\Eloquent\Builder<static>
  22054. * @static
  22055. */
  22056. public static function withCasts($casts)
  22057. {
  22058. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22059. return $instance->withCasts($casts);
  22060. }
  22061. /**
  22062. * Execute the given Closure within a transaction savepoint if needed.
  22063. *
  22064. * @template TModelValue
  22065. * @param \Closure(): TModelValue $scope
  22066. * @return TModelValue
  22067. * @static
  22068. */
  22069. public static function withSavepointIfNeeded($scope)
  22070. {
  22071. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22072. return $instance->withSavepointIfNeeded($scope);
  22073. }
  22074. /**
  22075. * Get the underlying query builder instance.
  22076. *
  22077. * @return \Illuminate\Database\Query\Builder
  22078. * @static
  22079. */
  22080. public static function getQuery()
  22081. {
  22082. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22083. return $instance->getQuery();
  22084. }
  22085. /**
  22086. * Set the underlying query builder instance.
  22087. *
  22088. * @param \Illuminate\Database\Query\Builder $query
  22089. * @return \Illuminate\Database\Eloquent\Builder<static>
  22090. * @static
  22091. */
  22092. public static function setQuery($query)
  22093. {
  22094. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22095. return $instance->setQuery($query);
  22096. }
  22097. /**
  22098. * Get a base query builder instance.
  22099. *
  22100. * @return \Illuminate\Database\Query\Builder
  22101. * @static
  22102. */
  22103. public static function toBase()
  22104. {
  22105. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22106. return $instance->toBase();
  22107. }
  22108. /**
  22109. * Get the relationships being eagerly loaded.
  22110. *
  22111. * @return array
  22112. * @static
  22113. */
  22114. public static function getEagerLoads()
  22115. {
  22116. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22117. return $instance->getEagerLoads();
  22118. }
  22119. /**
  22120. * Set the relationships being eagerly loaded.
  22121. *
  22122. * @param array $eagerLoad
  22123. * @return \Illuminate\Database\Eloquent\Builder<static>
  22124. * @static
  22125. */
  22126. public static function setEagerLoads($eagerLoad)
  22127. {
  22128. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22129. return $instance->setEagerLoads($eagerLoad);
  22130. }
  22131. /**
  22132. * Indicate that the given relationships should not be eagerly loaded.
  22133. *
  22134. * @param array $relations
  22135. * @return \Illuminate\Database\Eloquent\Builder<static>
  22136. * @static
  22137. */
  22138. public static function withoutEagerLoad($relations)
  22139. {
  22140. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22141. return $instance->withoutEagerLoad($relations);
  22142. }
  22143. /**
  22144. * Flush the relationships being eagerly loaded.
  22145. *
  22146. * @return \Illuminate\Database\Eloquent\Builder<static>
  22147. * @static
  22148. */
  22149. public static function withoutEagerLoads()
  22150. {
  22151. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22152. return $instance->withoutEagerLoads();
  22153. }
  22154. /**
  22155. * Get the "limit" value from the query or null if it's not set.
  22156. *
  22157. * @return mixed
  22158. * @static
  22159. */
  22160. public static function getLimit()
  22161. {
  22162. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22163. return $instance->getLimit();
  22164. }
  22165. /**
  22166. * Get the "offset" value from the query or null if it's not set.
  22167. *
  22168. * @return mixed
  22169. * @static
  22170. */
  22171. public static function getOffset()
  22172. {
  22173. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22174. return $instance->getOffset();
  22175. }
  22176. /**
  22177. * Get the model instance being queried.
  22178. *
  22179. * @return TModel
  22180. * @static
  22181. */
  22182. public static function getModel()
  22183. {
  22184. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22185. return $instance->getModel();
  22186. }
  22187. /**
  22188. * Set a model instance for the model being queried.
  22189. *
  22190. * @template TModelNew of \Illuminate\Database\Eloquent\Model
  22191. * @param TModelNew $model
  22192. * @return static<TModelNew>
  22193. * @static
  22194. */
  22195. public static function setModel($model)
  22196. {
  22197. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22198. return $instance->setModel($model);
  22199. }
  22200. /**
  22201. * Get the given macro by name.
  22202. *
  22203. * @param string $name
  22204. * @return \Closure
  22205. * @static
  22206. */
  22207. public static function getMacro($name)
  22208. {
  22209. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22210. return $instance->getMacro($name);
  22211. }
  22212. /**
  22213. * Checks if a macro is registered.
  22214. *
  22215. * @param string $name
  22216. * @return bool
  22217. * @static
  22218. */
  22219. public static function hasMacro($name)
  22220. {
  22221. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22222. return $instance->hasMacro($name);
  22223. }
  22224. /**
  22225. * Get the given global macro by name.
  22226. *
  22227. * @param string $name
  22228. * @return \Closure
  22229. * @static
  22230. */
  22231. public static function getGlobalMacro($name)
  22232. {
  22233. return \Illuminate\Database\Eloquent\Builder::getGlobalMacro($name);
  22234. }
  22235. /**
  22236. * Checks if a global macro is registered.
  22237. *
  22238. * @param string $name
  22239. * @return bool
  22240. * @static
  22241. */
  22242. public static function hasGlobalMacro($name)
  22243. {
  22244. return \Illuminate\Database\Eloquent\Builder::hasGlobalMacro($name);
  22245. }
  22246. /**
  22247. * Clone the Eloquent query builder.
  22248. *
  22249. * @return static
  22250. * @static
  22251. */
  22252. public static function clone()
  22253. {
  22254. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22255. return $instance->clone();
  22256. }
  22257. /**
  22258. * Register a closure to be invoked on a clone.
  22259. *
  22260. * @param \Closure $callback
  22261. * @return \Illuminate\Database\Eloquent\Builder<static>
  22262. * @static
  22263. */
  22264. public static function onClone($callback)
  22265. {
  22266. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22267. return $instance->onClone($callback);
  22268. }
  22269. /**
  22270. * Chunk the results of the query.
  22271. *
  22272. * @param int $count
  22273. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22274. * @return bool
  22275. * @static
  22276. */
  22277. public static function chunk($count, $callback)
  22278. {
  22279. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22280. return $instance->chunk($count, $callback);
  22281. }
  22282. /**
  22283. * Run a map over each item while chunking.
  22284. *
  22285. * @template TReturn
  22286. * @param callable(TValue): TReturn $callback
  22287. * @param int $count
  22288. * @return \Illuminate\Support\Collection<int, TReturn>
  22289. * @static
  22290. */
  22291. public static function chunkMap($callback, $count = 1000)
  22292. {
  22293. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22294. return $instance->chunkMap($callback, $count);
  22295. }
  22296. /**
  22297. * Execute a callback over each item while chunking.
  22298. *
  22299. * @param callable(TValue, int): mixed $callback
  22300. * @param int $count
  22301. * @return bool
  22302. * @throws \RuntimeException
  22303. * @static
  22304. */
  22305. public static function each($callback, $count = 1000)
  22306. {
  22307. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22308. return $instance->each($callback, $count);
  22309. }
  22310. /**
  22311. * Chunk the results of a query by comparing IDs.
  22312. *
  22313. * @param int $count
  22314. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22315. * @param string|null $column
  22316. * @param string|null $alias
  22317. * @return bool
  22318. * @static
  22319. */
  22320. public static function chunkById($count, $callback, $column = null, $alias = null)
  22321. {
  22322. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22323. return $instance->chunkById($count, $callback, $column, $alias);
  22324. }
  22325. /**
  22326. * Chunk the results of a query by comparing IDs in descending order.
  22327. *
  22328. * @param int $count
  22329. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22330. * @param string|null $column
  22331. * @param string|null $alias
  22332. * @return bool
  22333. * @static
  22334. */
  22335. public static function chunkByIdDesc($count, $callback, $column = null, $alias = null)
  22336. {
  22337. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22338. return $instance->chunkByIdDesc($count, $callback, $column, $alias);
  22339. }
  22340. /**
  22341. * Chunk the results of a query by comparing IDs in a given order.
  22342. *
  22343. * @param int $count
  22344. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22345. * @param string|null $column
  22346. * @param string|null $alias
  22347. * @param bool $descending
  22348. * @return bool
  22349. * @throws \RuntimeException
  22350. * @static
  22351. */
  22352. public static function orderedChunkById($count, $callback, $column = null, $alias = null, $descending = false)
  22353. {
  22354. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22355. return $instance->orderedChunkById($count, $callback, $column, $alias, $descending);
  22356. }
  22357. /**
  22358. * Execute a callback over each item while chunking by ID.
  22359. *
  22360. * @param callable(TValue, int): mixed $callback
  22361. * @param int $count
  22362. * @param string|null $column
  22363. * @param string|null $alias
  22364. * @return bool
  22365. * @static
  22366. */
  22367. public static function eachById($callback, $count = 1000, $column = null, $alias = null)
  22368. {
  22369. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22370. return $instance->eachById($callback, $count, $column, $alias);
  22371. }
  22372. /**
  22373. * Query lazily, by chunks of the given size.
  22374. *
  22375. * @param int $chunkSize
  22376. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22377. * @throws \InvalidArgumentException
  22378. * @static
  22379. */
  22380. public static function lazy($chunkSize = 1000)
  22381. {
  22382. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22383. return $instance->lazy($chunkSize);
  22384. }
  22385. /**
  22386. * Query lazily, by chunking the results of a query by comparing IDs.
  22387. *
  22388. * @param int $chunkSize
  22389. * @param string|null $column
  22390. * @param string|null $alias
  22391. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22392. * @throws \InvalidArgumentException
  22393. * @static
  22394. */
  22395. public static function lazyById($chunkSize = 1000, $column = null, $alias = null)
  22396. {
  22397. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22398. return $instance->lazyById($chunkSize, $column, $alias);
  22399. }
  22400. /**
  22401. * Query lazily, by chunking the results of a query by comparing IDs in descending order.
  22402. *
  22403. * @param int $chunkSize
  22404. * @param string|null $column
  22405. * @param string|null $alias
  22406. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22407. * @throws \InvalidArgumentException
  22408. * @static
  22409. */
  22410. public static function lazyByIdDesc($chunkSize = 1000, $column = null, $alias = null)
  22411. {
  22412. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22413. return $instance->lazyByIdDesc($chunkSize, $column, $alias);
  22414. }
  22415. /**
  22416. * Execute the query and get the first result.
  22417. *
  22418. * @param array|string $columns
  22419. * @return TValue|null
  22420. * @static
  22421. */
  22422. public static function first($columns = [])
  22423. {
  22424. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22425. return $instance->first($columns);
  22426. }
  22427. /**
  22428. * Execute the query and get the first result if it's the sole matching record.
  22429. *
  22430. * @param array|string $columns
  22431. * @return TValue
  22432. * @throws \Illuminate\Database\RecordsNotFoundException
  22433. * @throws \Illuminate\Database\MultipleRecordsFoundException
  22434. * @static
  22435. */
  22436. public static function baseSole($columns = [])
  22437. {
  22438. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22439. return $instance->baseSole($columns);
  22440. }
  22441. /**
  22442. * Pass the query to a given callback and then return it.
  22443. *
  22444. * @param callable($this): mixed $callback
  22445. * @return \Illuminate\Database\Eloquent\Builder<static>
  22446. * @static
  22447. */
  22448. public static function tap($callback)
  22449. {
  22450. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22451. return $instance->tap($callback);
  22452. }
  22453. /**
  22454. * Pass the query to a given callback and return the result.
  22455. *
  22456. * @template TReturn
  22457. * @param (callable($this): TReturn) $callback
  22458. * @return (TReturn is null|void ? $this : TReturn)
  22459. * @static
  22460. */
  22461. public static function pipe($callback)
  22462. {
  22463. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22464. return $instance->pipe($callback);
  22465. }
  22466. /**
  22467. * Apply the callback if the given "value" is (or resolves to) truthy.
  22468. *
  22469. * @template TWhenParameter
  22470. * @template TWhenReturnType
  22471. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  22472. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  22473. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  22474. * @return $this|TWhenReturnType
  22475. * @static
  22476. */
  22477. public static function when($value = null, $callback = null, $default = null)
  22478. {
  22479. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22480. return $instance->when($value, $callback, $default);
  22481. }
  22482. /**
  22483. * Apply the callback if the given "value" is (or resolves to) falsy.
  22484. *
  22485. * @template TUnlessParameter
  22486. * @template TUnlessReturnType
  22487. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  22488. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  22489. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  22490. * @return $this|TUnlessReturnType
  22491. * @static
  22492. */
  22493. public static function unless($value = null, $callback = null, $default = null)
  22494. {
  22495. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22496. return $instance->unless($value, $callback, $default);
  22497. }
  22498. /**
  22499. * Add a relationship count / exists condition to the query.
  22500. *
  22501. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22502. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22503. * @param string $operator
  22504. * @param int $count
  22505. * @param string $boolean
  22506. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22507. * @return \Illuminate\Database\Eloquent\Builder<static>
  22508. * @throws \RuntimeException
  22509. * @static
  22510. */
  22511. public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
  22512. {
  22513. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22514. return $instance->has($relation, $operator, $count, $boolean, $callback);
  22515. }
  22516. /**
  22517. * Add a relationship count / exists condition to the query with an "or".
  22518. *
  22519. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22520. * @param string $operator
  22521. * @param int $count
  22522. * @return \Illuminate\Database\Eloquent\Builder<static>
  22523. * @static
  22524. */
  22525. public static function orHas($relation, $operator = '>=', $count = 1)
  22526. {
  22527. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22528. return $instance->orHas($relation, $operator, $count);
  22529. }
  22530. /**
  22531. * Add a relationship count / exists condition to the query.
  22532. *
  22533. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22534. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22535. * @param string $boolean
  22536. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22537. * @return \Illuminate\Database\Eloquent\Builder<static>
  22538. * @static
  22539. */
  22540. public static function doesntHave($relation, $boolean = 'and', $callback = null)
  22541. {
  22542. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22543. return $instance->doesntHave($relation, $boolean, $callback);
  22544. }
  22545. /**
  22546. * Add a relationship count / exists condition to the query with an "or".
  22547. *
  22548. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22549. * @return \Illuminate\Database\Eloquent\Builder<static>
  22550. * @static
  22551. */
  22552. public static function orDoesntHave($relation)
  22553. {
  22554. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22555. return $instance->orDoesntHave($relation);
  22556. }
  22557. /**
  22558. * Add a relationship count / exists condition to the query with where clauses.
  22559. *
  22560. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22561. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22562. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22563. * @param string $operator
  22564. * @param int $count
  22565. * @return \Illuminate\Database\Eloquent\Builder<static>
  22566. * @static
  22567. */
  22568. public static function whereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22569. {
  22570. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22571. return $instance->whereHas($relation, $callback, $operator, $count);
  22572. }
  22573. /**
  22574. * Add a relationship count / exists condition to the query with where clauses.
  22575. *
  22576. * Also load the relationship with the same condition.
  22577. *
  22578. * @param string $relation
  22579. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Database\Eloquent\Relations\Relation<*, *, *>): mixed)|null $callback
  22580. * @param string $operator
  22581. * @param int $count
  22582. * @return \Illuminate\Database\Eloquent\Builder<static>
  22583. * @static
  22584. */
  22585. public static function withWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22586. {
  22587. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22588. return $instance->withWhereHas($relation, $callback, $operator, $count);
  22589. }
  22590. /**
  22591. * Add a relationship count / exists condition to the query with where clauses and an "or".
  22592. *
  22593. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22594. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22595. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22596. * @param string $operator
  22597. * @param int $count
  22598. * @return \Illuminate\Database\Eloquent\Builder<static>
  22599. * @static
  22600. */
  22601. public static function orWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22602. {
  22603. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22604. return $instance->orWhereHas($relation, $callback, $operator, $count);
  22605. }
  22606. /**
  22607. * Add a relationship count / exists condition to the query with where clauses.
  22608. *
  22609. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22610. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22611. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22612. * @return \Illuminate\Database\Eloquent\Builder<static>
  22613. * @static
  22614. */
  22615. public static function whereDoesntHave($relation, $callback = null)
  22616. {
  22617. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22618. return $instance->whereDoesntHave($relation, $callback);
  22619. }
  22620. /**
  22621. * Add a relationship count / exists condition to the query with where clauses and an "or".
  22622. *
  22623. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22624. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22625. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22626. * @return \Illuminate\Database\Eloquent\Builder<static>
  22627. * @static
  22628. */
  22629. public static function orWhereDoesntHave($relation, $callback = null)
  22630. {
  22631. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22632. return $instance->orWhereDoesntHave($relation, $callback);
  22633. }
  22634. /**
  22635. * Add a polymorphic relationship count / exists condition to the query.
  22636. *
  22637. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22638. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22639. * @param string|array<int, string> $types
  22640. * @param string $operator
  22641. * @param int $count
  22642. * @param string $boolean
  22643. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22644. * @return \Illuminate\Database\Eloquent\Builder<static>
  22645. * @static
  22646. */
  22647. public static function hasMorph($relation, $types, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
  22648. {
  22649. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22650. return $instance->hasMorph($relation, $types, $operator, $count, $boolean, $callback);
  22651. }
  22652. /**
  22653. * Add a polymorphic relationship count / exists condition to the query with an "or".
  22654. *
  22655. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22656. * @param string|array<int, string> $types
  22657. * @param string $operator
  22658. * @param int $count
  22659. * @return \Illuminate\Database\Eloquent\Builder<static>
  22660. * @static
  22661. */
  22662. public static function orHasMorph($relation, $types, $operator = '>=', $count = 1)
  22663. {
  22664. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22665. return $instance->orHasMorph($relation, $types, $operator, $count);
  22666. }
  22667. /**
  22668. * Add a polymorphic relationship count / exists condition to the query.
  22669. *
  22670. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22671. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22672. * @param string|array<int, string> $types
  22673. * @param string $boolean
  22674. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22675. * @return \Illuminate\Database\Eloquent\Builder<static>
  22676. * @static
  22677. */
  22678. public static function doesntHaveMorph($relation, $types, $boolean = 'and', $callback = null)
  22679. {
  22680. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22681. return $instance->doesntHaveMorph($relation, $types, $boolean, $callback);
  22682. }
  22683. /**
  22684. * Add a polymorphic relationship count / exists condition to the query with an "or".
  22685. *
  22686. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22687. * @param string|array<int, string> $types
  22688. * @return \Illuminate\Database\Eloquent\Builder<static>
  22689. * @static
  22690. */
  22691. public static function orDoesntHaveMorph($relation, $types)
  22692. {
  22693. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22694. return $instance->orDoesntHaveMorph($relation, $types);
  22695. }
  22696. /**
  22697. * Add a polymorphic relationship count / exists condition to the query with where clauses.
  22698. *
  22699. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22700. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22701. * @param string|array<int, string> $types
  22702. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22703. * @param string $operator
  22704. * @param int $count
  22705. * @return \Illuminate\Database\Eloquent\Builder<static>
  22706. * @static
  22707. */
  22708. public static function whereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1)
  22709. {
  22710. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22711. return $instance->whereHasMorph($relation, $types, $callback, $operator, $count);
  22712. }
  22713. /**
  22714. * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or".
  22715. *
  22716. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22717. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22718. * @param string|array<int, string> $types
  22719. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22720. * @param string $operator
  22721. * @param int $count
  22722. * @return \Illuminate\Database\Eloquent\Builder<static>
  22723. * @static
  22724. */
  22725. public static function orWhereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1)
  22726. {
  22727. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22728. return $instance->orWhereHasMorph($relation, $types, $callback, $operator, $count);
  22729. }
  22730. /**
  22731. * Add a polymorphic relationship count / exists condition to the query with where clauses.
  22732. *
  22733. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22734. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22735. * @param string|array<int, string> $types
  22736. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22737. * @return \Illuminate\Database\Eloquent\Builder<static>
  22738. * @static
  22739. */
  22740. public static function whereDoesntHaveMorph($relation, $types, $callback = null)
  22741. {
  22742. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22743. return $instance->whereDoesntHaveMorph($relation, $types, $callback);
  22744. }
  22745. /**
  22746. * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or".
  22747. *
  22748. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22749. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22750. * @param string|array<int, string> $types
  22751. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22752. * @return \Illuminate\Database\Eloquent\Builder<static>
  22753. * @static
  22754. */
  22755. public static function orWhereDoesntHaveMorph($relation, $types, $callback = null)
  22756. {
  22757. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22758. return $instance->orWhereDoesntHaveMorph($relation, $types, $callback);
  22759. }
  22760. /**
  22761. * Add a basic where clause to a relationship query.
  22762. *
  22763. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22764. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22765. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22766. * @param mixed $operator
  22767. * @param mixed $value
  22768. * @return \Illuminate\Database\Eloquent\Builder<static>
  22769. * @static
  22770. */
  22771. public static function whereRelation($relation, $column, $operator = null, $value = null)
  22772. {
  22773. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22774. return $instance->whereRelation($relation, $column, $operator, $value);
  22775. }
  22776. /**
  22777. * Add a basic where clause to a relationship query and eager-load the relationship with the same conditions.
  22778. *
  22779. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22780. * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22781. * @param mixed $operator
  22782. * @param mixed $value
  22783. * @return \Illuminate\Database\Eloquent\Builder<static>
  22784. * @static
  22785. */
  22786. public static function withWhereRelation($relation, $column, $operator = null, $value = null)
  22787. {
  22788. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22789. return $instance->withWhereRelation($relation, $column, $operator, $value);
  22790. }
  22791. /**
  22792. * Add an "or where" clause to a relationship query.
  22793. *
  22794. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22795. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22796. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22797. * @param mixed $operator
  22798. * @param mixed $value
  22799. * @return \Illuminate\Database\Eloquent\Builder<static>
  22800. * @static
  22801. */
  22802. public static function orWhereRelation($relation, $column, $operator = null, $value = null)
  22803. {
  22804. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22805. return $instance->orWhereRelation($relation, $column, $operator, $value);
  22806. }
  22807. /**
  22808. * Add a basic count / exists condition to a relationship query.
  22809. *
  22810. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22811. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22812. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22813. * @param mixed $operator
  22814. * @param mixed $value
  22815. * @return \Illuminate\Database\Eloquent\Builder<static>
  22816. * @static
  22817. */
  22818. public static function whereDoesntHaveRelation($relation, $column, $operator = null, $value = null)
  22819. {
  22820. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22821. return $instance->whereDoesntHaveRelation($relation, $column, $operator, $value);
  22822. }
  22823. /**
  22824. * Add an "or where" clause to a relationship query.
  22825. *
  22826. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22827. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22828. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22829. * @param mixed $operator
  22830. * @param mixed $value
  22831. * @return \Illuminate\Database\Eloquent\Builder<static>
  22832. * @static
  22833. */
  22834. public static function orWhereDoesntHaveRelation($relation, $column, $operator = null, $value = null)
  22835. {
  22836. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22837. return $instance->orWhereDoesntHaveRelation($relation, $column, $operator, $value);
  22838. }
  22839. /**
  22840. * Add a polymorphic relationship condition to the query with a where clause.
  22841. *
  22842. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22843. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22844. * @param string|array<int, string> $types
  22845. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22846. * @param mixed $operator
  22847. * @param mixed $value
  22848. * @return \Illuminate\Database\Eloquent\Builder<static>
  22849. * @static
  22850. */
  22851. public static function whereMorphRelation($relation, $types, $column, $operator = null, $value = null)
  22852. {
  22853. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22854. return $instance->whereMorphRelation($relation, $types, $column, $operator, $value);
  22855. }
  22856. /**
  22857. * Add a polymorphic relationship condition to the query with an "or where" clause.
  22858. *
  22859. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22860. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22861. * @param string|array<int, string> $types
  22862. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22863. * @param mixed $operator
  22864. * @param mixed $value
  22865. * @return \Illuminate\Database\Eloquent\Builder<static>
  22866. * @static
  22867. */
  22868. public static function orWhereMorphRelation($relation, $types, $column, $operator = null, $value = null)
  22869. {
  22870. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22871. return $instance->orWhereMorphRelation($relation, $types, $column, $operator, $value);
  22872. }
  22873. /**
  22874. * Add a polymorphic relationship condition to the query with a doesn't have clause.
  22875. *
  22876. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22877. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22878. * @param string|array<int, string> $types
  22879. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22880. * @param mixed $operator
  22881. * @param mixed $value
  22882. * @return \Illuminate\Database\Eloquent\Builder<static>
  22883. * @static
  22884. */
  22885. public static function whereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null)
  22886. {
  22887. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22888. return $instance->whereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value);
  22889. }
  22890. /**
  22891. * Add a polymorphic relationship condition to the query with an "or doesn't have" clause.
  22892. *
  22893. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22894. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22895. * @param string|array<int, string> $types
  22896. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22897. * @param mixed $operator
  22898. * @param mixed $value
  22899. * @return \Illuminate\Database\Eloquent\Builder<static>
  22900. * @static
  22901. */
  22902. public static function orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null)
  22903. {
  22904. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22905. return $instance->orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value);
  22906. }
  22907. /**
  22908. * Add a morph-to relationship condition to the query.
  22909. *
  22910. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22911. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
  22912. * @return \Illuminate\Database\Eloquent\Builder<static>
  22913. * @static
  22914. */
  22915. public static function whereMorphedTo($relation, $model, $boolean = 'and')
  22916. {
  22917. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22918. return $instance->whereMorphedTo($relation, $model, $boolean);
  22919. }
  22920. /**
  22921. * Add a not morph-to relationship condition to the query.
  22922. *
  22923. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22924. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
  22925. * @return \Illuminate\Database\Eloquent\Builder<static>
  22926. * @static
  22927. */
  22928. public static function whereNotMorphedTo($relation, $model, $boolean = 'and')
  22929. {
  22930. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22931. return $instance->whereNotMorphedTo($relation, $model, $boolean);
  22932. }
  22933. /**
  22934. * Add a morph-to relationship condition to the query with an "or where" clause.
  22935. *
  22936. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22937. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
  22938. * @return \Illuminate\Database\Eloquent\Builder<static>
  22939. * @static
  22940. */
  22941. public static function orWhereMorphedTo($relation, $model)
  22942. {
  22943. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22944. return $instance->orWhereMorphedTo($relation, $model);
  22945. }
  22946. /**
  22947. * Add a not morph-to relationship condition to the query with an "or where" clause.
  22948. *
  22949. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22950. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
  22951. * @return \Illuminate\Database\Eloquent\Builder<static>
  22952. * @static
  22953. */
  22954. public static function orWhereNotMorphedTo($relation, $model)
  22955. {
  22956. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22957. return $instance->orWhereNotMorphedTo($relation, $model);
  22958. }
  22959. /**
  22960. * Add a "belongs to" relationship where clause to the query.
  22961. *
  22962. * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model> $related
  22963. * @param string|null $relationshipName
  22964. * @param string $boolean
  22965. * @return \Illuminate\Database\Eloquent\Builder<static>
  22966. * @throws \Illuminate\Database\Eloquent\RelationNotFoundException
  22967. * @static
  22968. */
  22969. public static function whereBelongsTo($related, $relationshipName = null, $boolean = 'and')
  22970. {
  22971. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22972. return $instance->whereBelongsTo($related, $relationshipName, $boolean);
  22973. }
  22974. /**
  22975. * Add a "BelongsTo" relationship with an "or where" clause to the query.
  22976. *
  22977. * @param \Illuminate\Database\Eloquent\Model $related
  22978. * @param string|null $relationshipName
  22979. * @return \Illuminate\Database\Eloquent\Builder<static>
  22980. * @throws \RuntimeException
  22981. * @static
  22982. */
  22983. public static function orWhereBelongsTo($related, $relationshipName = null)
  22984. {
  22985. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22986. return $instance->orWhereBelongsTo($related, $relationshipName);
  22987. }
  22988. /**
  22989. * Add a "belongs to many" relationship where clause to the query.
  22990. *
  22991. * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model> $related
  22992. * @param string|null $relationshipName
  22993. * @param string $boolean
  22994. * @return \Illuminate\Database\Eloquent\Builder<static>
  22995. * @throws \Illuminate\Database\Eloquent\RelationNotFoundException
  22996. * @static
  22997. */
  22998. public static function whereAttachedTo($related, $relationshipName = null, $boolean = 'and')
  22999. {
  23000. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23001. return $instance->whereAttachedTo($related, $relationshipName, $boolean);
  23002. }
  23003. /**
  23004. * Add a "belongs to many" relationship with an "or where" clause to the query.
  23005. *
  23006. * @param \Illuminate\Database\Eloquent\Model $related
  23007. * @param string|null $relationshipName
  23008. * @return \Illuminate\Database\Eloquent\Builder<static>
  23009. * @throws \RuntimeException
  23010. * @static
  23011. */
  23012. public static function orWhereAttachedTo($related, $relationshipName = null)
  23013. {
  23014. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23015. return $instance->orWhereAttachedTo($related, $relationshipName);
  23016. }
  23017. /**
  23018. * Add subselect queries to include an aggregate value for a relationship.
  23019. *
  23020. * @param mixed $relations
  23021. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23022. * @param string $function
  23023. * @return \Illuminate\Database\Eloquent\Builder<static>
  23024. * @static
  23025. */
  23026. public static function withAggregate($relations, $column, $function = null)
  23027. {
  23028. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23029. return $instance->withAggregate($relations, $column, $function);
  23030. }
  23031. /**
  23032. * Add subselect queries to count the relations.
  23033. *
  23034. * @param mixed $relations
  23035. * @return \Illuminate\Database\Eloquent\Builder<static>
  23036. * @static
  23037. */
  23038. public static function withCount($relations)
  23039. {
  23040. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23041. return $instance->withCount($relations);
  23042. }
  23043. /**
  23044. * Add subselect queries to include the max of the relation's column.
  23045. *
  23046. * @param string|array $relation
  23047. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23048. * @return \Illuminate\Database\Eloquent\Builder<static>
  23049. * @static
  23050. */
  23051. public static function withMax($relation, $column)
  23052. {
  23053. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23054. return $instance->withMax($relation, $column);
  23055. }
  23056. /**
  23057. * Add subselect queries to include the min of the relation's column.
  23058. *
  23059. * @param string|array $relation
  23060. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23061. * @return \Illuminate\Database\Eloquent\Builder<static>
  23062. * @static
  23063. */
  23064. public static function withMin($relation, $column)
  23065. {
  23066. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23067. return $instance->withMin($relation, $column);
  23068. }
  23069. /**
  23070. * Add subselect queries to include the sum of the relation's column.
  23071. *
  23072. * @param string|array $relation
  23073. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23074. * @return \Illuminate\Database\Eloquent\Builder<static>
  23075. * @static
  23076. */
  23077. public static function withSum($relation, $column)
  23078. {
  23079. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23080. return $instance->withSum($relation, $column);
  23081. }
  23082. /**
  23083. * Add subselect queries to include the average of the relation's column.
  23084. *
  23085. * @param string|array $relation
  23086. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23087. * @return \Illuminate\Database\Eloquent\Builder<static>
  23088. * @static
  23089. */
  23090. public static function withAvg($relation, $column)
  23091. {
  23092. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23093. return $instance->withAvg($relation, $column);
  23094. }
  23095. /**
  23096. * Add subselect queries to include the existence of related models.
  23097. *
  23098. * @param string|array $relation
  23099. * @return \Illuminate\Database\Eloquent\Builder<static>
  23100. * @static
  23101. */
  23102. public static function withExists($relation)
  23103. {
  23104. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23105. return $instance->withExists($relation);
  23106. }
  23107. /**
  23108. * Merge the where constraints from another query to the current query.
  23109. *
  23110. * @param \Illuminate\Database\Eloquent\Builder<*> $from
  23111. * @return \Illuminate\Database\Eloquent\Builder<static>
  23112. * @static
  23113. */
  23114. public static function mergeConstraintsFrom($from)
  23115. {
  23116. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23117. return $instance->mergeConstraintsFrom($from);
  23118. }
  23119. /**
  23120. * Set the columns to be selected.
  23121. *
  23122. * @param mixed $columns
  23123. * @return \Illuminate\Database\Eloquent\Builder<static>
  23124. * @static
  23125. */
  23126. public static function select($columns = [])
  23127. {
  23128. /** @var \Illuminate\Database\Query\Builder $instance */
  23129. return $instance->select($columns);
  23130. }
  23131. /**
  23132. * Add a subselect expression to the query.
  23133. *
  23134. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23135. * @param string $as
  23136. * @return \Illuminate\Database\Eloquent\Builder<static>
  23137. * @throws \InvalidArgumentException
  23138. * @static
  23139. */
  23140. public static function selectSub($query, $as)
  23141. {
  23142. /** @var \Illuminate\Database\Query\Builder $instance */
  23143. return $instance->selectSub($query, $as);
  23144. }
  23145. /**
  23146. * Add a new "raw" select expression to the query.
  23147. *
  23148. * @param string $expression
  23149. * @return \Illuminate\Database\Eloquent\Builder<static>
  23150. * @static
  23151. */
  23152. public static function selectRaw($expression, $bindings = [])
  23153. {
  23154. /** @var \Illuminate\Database\Query\Builder $instance */
  23155. return $instance->selectRaw($expression, $bindings);
  23156. }
  23157. /**
  23158. * Makes "from" fetch from a subquery.
  23159. *
  23160. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23161. * @param string $as
  23162. * @return \Illuminate\Database\Eloquent\Builder<static>
  23163. * @throws \InvalidArgumentException
  23164. * @static
  23165. */
  23166. public static function fromSub($query, $as)
  23167. {
  23168. /** @var \Illuminate\Database\Query\Builder $instance */
  23169. return $instance->fromSub($query, $as);
  23170. }
  23171. /**
  23172. * Add a raw from clause to the query.
  23173. *
  23174. * @param string $expression
  23175. * @param mixed $bindings
  23176. * @return \Illuminate\Database\Eloquent\Builder<static>
  23177. * @static
  23178. */
  23179. public static function fromRaw($expression, $bindings = [])
  23180. {
  23181. /** @var \Illuminate\Database\Query\Builder $instance */
  23182. return $instance->fromRaw($expression, $bindings);
  23183. }
  23184. /**
  23185. * Add a new select column to the query.
  23186. *
  23187. * @param mixed $column
  23188. * @return \Illuminate\Database\Eloquent\Builder<static>
  23189. * @static
  23190. */
  23191. public static function addSelect($column)
  23192. {
  23193. /** @var \Illuminate\Database\Query\Builder $instance */
  23194. return $instance->addSelect($column);
  23195. }
  23196. /**
  23197. * Force the query to only return distinct results.
  23198. *
  23199. * @return \Illuminate\Database\Eloquent\Builder<static>
  23200. * @static
  23201. */
  23202. public static function distinct()
  23203. {
  23204. /** @var \Illuminate\Database\Query\Builder $instance */
  23205. return $instance->distinct();
  23206. }
  23207. /**
  23208. * Set the table which the query is targeting.
  23209. *
  23210. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $table
  23211. * @param string|null $as
  23212. * @return \Illuminate\Database\Eloquent\Builder<static>
  23213. * @static
  23214. */
  23215. public static function from($table, $as = null)
  23216. {
  23217. /** @var \Illuminate\Database\Query\Builder $instance */
  23218. return $instance->from($table, $as);
  23219. }
  23220. /**
  23221. * Add an index hint to suggest a query index.
  23222. *
  23223. * @param string $index
  23224. * @return \Illuminate\Database\Eloquent\Builder<static>
  23225. * @static
  23226. */
  23227. public static function useIndex($index)
  23228. {
  23229. /** @var \Illuminate\Database\Query\Builder $instance */
  23230. return $instance->useIndex($index);
  23231. }
  23232. /**
  23233. * Add an index hint to force a query index.
  23234. *
  23235. * @param string $index
  23236. * @return \Illuminate\Database\Eloquent\Builder<static>
  23237. * @static
  23238. */
  23239. public static function forceIndex($index)
  23240. {
  23241. /** @var \Illuminate\Database\Query\Builder $instance */
  23242. return $instance->forceIndex($index);
  23243. }
  23244. /**
  23245. * Add an index hint to ignore a query index.
  23246. *
  23247. * @param string $index
  23248. * @return \Illuminate\Database\Eloquent\Builder<static>
  23249. * @static
  23250. */
  23251. public static function ignoreIndex($index)
  23252. {
  23253. /** @var \Illuminate\Database\Query\Builder $instance */
  23254. return $instance->ignoreIndex($index);
  23255. }
  23256. /**
  23257. * Add a join clause to the query.
  23258. *
  23259. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23260. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23261. * @param string|null $operator
  23262. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23263. * @param string $type
  23264. * @param bool $where
  23265. * @return \Illuminate\Database\Eloquent\Builder<static>
  23266. * @static
  23267. */
  23268. public static function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false)
  23269. {
  23270. /** @var \Illuminate\Database\Query\Builder $instance */
  23271. return $instance->join($table, $first, $operator, $second, $type, $where);
  23272. }
  23273. /**
  23274. * Add a "join where" clause to the query.
  23275. *
  23276. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23277. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23278. * @param string $operator
  23279. * @param \Illuminate\Contracts\Database\Query\Expression|string $second
  23280. * @param string $type
  23281. * @return \Illuminate\Database\Eloquent\Builder<static>
  23282. * @static
  23283. */
  23284. public static function joinWhere($table, $first, $operator, $second, $type = 'inner')
  23285. {
  23286. /** @var \Illuminate\Database\Query\Builder $instance */
  23287. return $instance->joinWhere($table, $first, $operator, $second, $type);
  23288. }
  23289. /**
  23290. * Add a subquery join clause to the query.
  23291. *
  23292. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23293. * @param string $as
  23294. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23295. * @param string|null $operator
  23296. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23297. * @param string $type
  23298. * @param bool $where
  23299. * @return \Illuminate\Database\Eloquent\Builder<static>
  23300. * @throws \InvalidArgumentException
  23301. * @static
  23302. */
  23303. public static function joinSub($query, $as, $first, $operator = null, $second = null, $type = 'inner', $where = false)
  23304. {
  23305. /** @var \Illuminate\Database\Query\Builder $instance */
  23306. return $instance->joinSub($query, $as, $first, $operator, $second, $type, $where);
  23307. }
  23308. /**
  23309. * Add a lateral join clause to the query.
  23310. *
  23311. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23312. * @return \Illuminate\Database\Eloquent\Builder<static>
  23313. * @static
  23314. */
  23315. public static function joinLateral($query, $as, $type = 'inner')
  23316. {
  23317. /** @var \Illuminate\Database\Query\Builder $instance */
  23318. return $instance->joinLateral($query, $as, $type);
  23319. }
  23320. /**
  23321. * Add a lateral left join to the query.
  23322. *
  23323. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23324. * @return \Illuminate\Database\Eloquent\Builder<static>
  23325. * @static
  23326. */
  23327. public static function leftJoinLateral($query, $as)
  23328. {
  23329. /** @var \Illuminate\Database\Query\Builder $instance */
  23330. return $instance->leftJoinLateral($query, $as);
  23331. }
  23332. /**
  23333. * Add a left join to the query.
  23334. *
  23335. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23336. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23337. * @param string|null $operator
  23338. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23339. * @return \Illuminate\Database\Eloquent\Builder<static>
  23340. * @static
  23341. */
  23342. public static function leftJoin($table, $first, $operator = null, $second = null)
  23343. {
  23344. /** @var \Illuminate\Database\Query\Builder $instance */
  23345. return $instance->leftJoin($table, $first, $operator, $second);
  23346. }
  23347. /**
  23348. * Add a "join where" clause to the query.
  23349. *
  23350. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23351. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23352. * @param string $operator
  23353. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23354. * @return \Illuminate\Database\Eloquent\Builder<static>
  23355. * @static
  23356. */
  23357. public static function leftJoinWhere($table, $first, $operator, $second)
  23358. {
  23359. /** @var \Illuminate\Database\Query\Builder $instance */
  23360. return $instance->leftJoinWhere($table, $first, $operator, $second);
  23361. }
  23362. /**
  23363. * Add a subquery left join to the query.
  23364. *
  23365. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23366. * @param string $as
  23367. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23368. * @param string|null $operator
  23369. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23370. * @return \Illuminate\Database\Eloquent\Builder<static>
  23371. * @static
  23372. */
  23373. public static function leftJoinSub($query, $as, $first, $operator = null, $second = null)
  23374. {
  23375. /** @var \Illuminate\Database\Query\Builder $instance */
  23376. return $instance->leftJoinSub($query, $as, $first, $operator, $second);
  23377. }
  23378. /**
  23379. * Add a right join to the query.
  23380. *
  23381. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23382. * @param \Closure|string $first
  23383. * @param string|null $operator
  23384. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23385. * @return \Illuminate\Database\Eloquent\Builder<static>
  23386. * @static
  23387. */
  23388. public static function rightJoin($table, $first, $operator = null, $second = null)
  23389. {
  23390. /** @var \Illuminate\Database\Query\Builder $instance */
  23391. return $instance->rightJoin($table, $first, $operator, $second);
  23392. }
  23393. /**
  23394. * Add a "right join where" clause to the query.
  23395. *
  23396. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23397. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23398. * @param string $operator
  23399. * @param \Illuminate\Contracts\Database\Query\Expression|string $second
  23400. * @return \Illuminate\Database\Eloquent\Builder<static>
  23401. * @static
  23402. */
  23403. public static function rightJoinWhere($table, $first, $operator, $second)
  23404. {
  23405. /** @var \Illuminate\Database\Query\Builder $instance */
  23406. return $instance->rightJoinWhere($table, $first, $operator, $second);
  23407. }
  23408. /**
  23409. * Add a subquery right join to the query.
  23410. *
  23411. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23412. * @param string $as
  23413. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23414. * @param string|null $operator
  23415. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23416. * @return \Illuminate\Database\Eloquent\Builder<static>
  23417. * @static
  23418. */
  23419. public static function rightJoinSub($query, $as, $first, $operator = null, $second = null)
  23420. {
  23421. /** @var \Illuminate\Database\Query\Builder $instance */
  23422. return $instance->rightJoinSub($query, $as, $first, $operator, $second);
  23423. }
  23424. /**
  23425. * Add a "cross join" clause to the query.
  23426. *
  23427. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23428. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string|null $first
  23429. * @param string|null $operator
  23430. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23431. * @return \Illuminate\Database\Eloquent\Builder<static>
  23432. * @static
  23433. */
  23434. public static function crossJoin($table, $first = null, $operator = null, $second = null)
  23435. {
  23436. /** @var \Illuminate\Database\Query\Builder $instance */
  23437. return $instance->crossJoin($table, $first, $operator, $second);
  23438. }
  23439. /**
  23440. * Add a subquery cross join to the query.
  23441. *
  23442. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23443. * @param string $as
  23444. * @return \Illuminate\Database\Eloquent\Builder<static>
  23445. * @static
  23446. */
  23447. public static function crossJoinSub($query, $as)
  23448. {
  23449. /** @var \Illuminate\Database\Query\Builder $instance */
  23450. return $instance->crossJoinSub($query, $as);
  23451. }
  23452. /**
  23453. * Merge an array of where clauses and bindings.
  23454. *
  23455. * @param array $wheres
  23456. * @param array $bindings
  23457. * @return \Illuminate\Database\Eloquent\Builder<static>
  23458. * @static
  23459. */
  23460. public static function mergeWheres($wheres, $bindings)
  23461. {
  23462. /** @var \Illuminate\Database\Query\Builder $instance */
  23463. return $instance->mergeWheres($wheres, $bindings);
  23464. }
  23465. /**
  23466. * Prepare the value and operator for a where clause.
  23467. *
  23468. * @param string $value
  23469. * @param string $operator
  23470. * @param bool $useDefault
  23471. * @return array
  23472. * @throws \InvalidArgumentException
  23473. * @static
  23474. */
  23475. public static function prepareValueAndOperator($value, $operator, $useDefault = false)
  23476. {
  23477. /** @var \Illuminate\Database\Query\Builder $instance */
  23478. return $instance->prepareValueAndOperator($value, $operator, $useDefault);
  23479. }
  23480. /**
  23481. * Add a "where" clause comparing two columns to the query.
  23482. *
  23483. * @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
  23484. * @param string|null $operator
  23485. * @param string|null $second
  23486. * @param string|null $boolean
  23487. * @return \Illuminate\Database\Eloquent\Builder<static>
  23488. * @static
  23489. */
  23490. public static function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
  23491. {
  23492. /** @var \Illuminate\Database\Query\Builder $instance */
  23493. return $instance->whereColumn($first, $operator, $second, $boolean);
  23494. }
  23495. /**
  23496. * Add an "or where" clause comparing two columns to the query.
  23497. *
  23498. * @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
  23499. * @param string|null $operator
  23500. * @param string|null $second
  23501. * @return \Illuminate\Database\Eloquent\Builder<static>
  23502. * @static
  23503. */
  23504. public static function orWhereColumn($first, $operator = null, $second = null)
  23505. {
  23506. /** @var \Illuminate\Database\Query\Builder $instance */
  23507. return $instance->orWhereColumn($first, $operator, $second);
  23508. }
  23509. /**
  23510. * Add a raw where clause to the query.
  23511. *
  23512. * @param \Illuminate\Contracts\Database\Query\Expression|string $sql
  23513. * @param mixed $bindings
  23514. * @param string $boolean
  23515. * @return \Illuminate\Database\Eloquent\Builder<static>
  23516. * @static
  23517. */
  23518. public static function whereRaw($sql, $bindings = [], $boolean = 'and')
  23519. {
  23520. /** @var \Illuminate\Database\Query\Builder $instance */
  23521. return $instance->whereRaw($sql, $bindings, $boolean);
  23522. }
  23523. /**
  23524. * Add a raw or where clause to the query.
  23525. *
  23526. * @param string $sql
  23527. * @param mixed $bindings
  23528. * @return \Illuminate\Database\Eloquent\Builder<static>
  23529. * @static
  23530. */
  23531. public static function orWhereRaw($sql, $bindings = [])
  23532. {
  23533. /** @var \Illuminate\Database\Query\Builder $instance */
  23534. return $instance->orWhereRaw($sql, $bindings);
  23535. }
  23536. /**
  23537. * Add a "where like" clause to the query.
  23538. *
  23539. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23540. * @param string $value
  23541. * @param bool $caseSensitive
  23542. * @param string $boolean
  23543. * @param bool $not
  23544. * @return \Illuminate\Database\Eloquent\Builder<static>
  23545. * @static
  23546. */
  23547. public static function whereLike($column, $value, $caseSensitive = false, $boolean = 'and', $not = false)
  23548. {
  23549. /** @var \Illuminate\Database\Query\Builder $instance */
  23550. return $instance->whereLike($column, $value, $caseSensitive, $boolean, $not);
  23551. }
  23552. /**
  23553. * Add an "or where like" clause to the query.
  23554. *
  23555. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23556. * @param string $value
  23557. * @param bool $caseSensitive
  23558. * @return \Illuminate\Database\Eloquent\Builder<static>
  23559. * @static
  23560. */
  23561. public static function orWhereLike($column, $value, $caseSensitive = false)
  23562. {
  23563. /** @var \Illuminate\Database\Query\Builder $instance */
  23564. return $instance->orWhereLike($column, $value, $caseSensitive);
  23565. }
  23566. /**
  23567. * Add a "where not like" clause to the query.
  23568. *
  23569. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23570. * @param string $value
  23571. * @param bool $caseSensitive
  23572. * @param string $boolean
  23573. * @return \Illuminate\Database\Eloquent\Builder<static>
  23574. * @static
  23575. */
  23576. public static function whereNotLike($column, $value, $caseSensitive = false, $boolean = 'and')
  23577. {
  23578. /** @var \Illuminate\Database\Query\Builder $instance */
  23579. return $instance->whereNotLike($column, $value, $caseSensitive, $boolean);
  23580. }
  23581. /**
  23582. * Add an "or where not like" clause to the query.
  23583. *
  23584. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23585. * @param string $value
  23586. * @param bool $caseSensitive
  23587. * @return \Illuminate\Database\Eloquent\Builder<static>
  23588. * @static
  23589. */
  23590. public static function orWhereNotLike($column, $value, $caseSensitive = false)
  23591. {
  23592. /** @var \Illuminate\Database\Query\Builder $instance */
  23593. return $instance->orWhereNotLike($column, $value, $caseSensitive);
  23594. }
  23595. /**
  23596. * Add a "where in" clause to the query.
  23597. *
  23598. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23599. * @param mixed $values
  23600. * @param string $boolean
  23601. * @param bool $not
  23602. * @return \Illuminate\Database\Eloquent\Builder<static>
  23603. * @static
  23604. */
  23605. public static function whereIn($column, $values, $boolean = 'and', $not = false)
  23606. {
  23607. /** @var \Illuminate\Database\Query\Builder $instance */
  23608. return $instance->whereIn($column, $values, $boolean, $not);
  23609. }
  23610. /**
  23611. * Add an "or where in" clause to the query.
  23612. *
  23613. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23614. * @param mixed $values
  23615. * @return \Illuminate\Database\Eloquent\Builder<static>
  23616. * @static
  23617. */
  23618. public static function orWhereIn($column, $values)
  23619. {
  23620. /** @var \Illuminate\Database\Query\Builder $instance */
  23621. return $instance->orWhereIn($column, $values);
  23622. }
  23623. /**
  23624. * Add a "where not in" clause to the query.
  23625. *
  23626. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23627. * @param mixed $values
  23628. * @param string $boolean
  23629. * @return \Illuminate\Database\Eloquent\Builder<static>
  23630. * @static
  23631. */
  23632. public static function whereNotIn($column, $values, $boolean = 'and')
  23633. {
  23634. /** @var \Illuminate\Database\Query\Builder $instance */
  23635. return $instance->whereNotIn($column, $values, $boolean);
  23636. }
  23637. /**
  23638. * Add an "or where not in" clause to the query.
  23639. *
  23640. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23641. * @param mixed $values
  23642. * @return \Illuminate\Database\Eloquent\Builder<static>
  23643. * @static
  23644. */
  23645. public static function orWhereNotIn($column, $values)
  23646. {
  23647. /** @var \Illuminate\Database\Query\Builder $instance */
  23648. return $instance->orWhereNotIn($column, $values);
  23649. }
  23650. /**
  23651. * Add a "where in raw" clause for integer values to the query.
  23652. *
  23653. * @param string $column
  23654. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23655. * @param string $boolean
  23656. * @param bool $not
  23657. * @return \Illuminate\Database\Eloquent\Builder<static>
  23658. * @static
  23659. */
  23660. public static function whereIntegerInRaw($column, $values, $boolean = 'and', $not = false)
  23661. {
  23662. /** @var \Illuminate\Database\Query\Builder $instance */
  23663. return $instance->whereIntegerInRaw($column, $values, $boolean, $not);
  23664. }
  23665. /**
  23666. * Add an "or where in raw" clause for integer values to the query.
  23667. *
  23668. * @param string $column
  23669. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23670. * @return \Illuminate\Database\Eloquent\Builder<static>
  23671. * @static
  23672. */
  23673. public static function orWhereIntegerInRaw($column, $values)
  23674. {
  23675. /** @var \Illuminate\Database\Query\Builder $instance */
  23676. return $instance->orWhereIntegerInRaw($column, $values);
  23677. }
  23678. /**
  23679. * Add a "where not in raw" clause for integer values to the query.
  23680. *
  23681. * @param string $column
  23682. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23683. * @param string $boolean
  23684. * @return \Illuminate\Database\Eloquent\Builder<static>
  23685. * @static
  23686. */
  23687. public static function whereIntegerNotInRaw($column, $values, $boolean = 'and')
  23688. {
  23689. /** @var \Illuminate\Database\Query\Builder $instance */
  23690. return $instance->whereIntegerNotInRaw($column, $values, $boolean);
  23691. }
  23692. /**
  23693. * Add an "or where not in raw" clause for integer values to the query.
  23694. *
  23695. * @param string $column
  23696. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23697. * @return \Illuminate\Database\Eloquent\Builder<static>
  23698. * @static
  23699. */
  23700. public static function orWhereIntegerNotInRaw($column, $values)
  23701. {
  23702. /** @var \Illuminate\Database\Query\Builder $instance */
  23703. return $instance->orWhereIntegerNotInRaw($column, $values);
  23704. }
  23705. /**
  23706. * Add a "where null" clause to the query.
  23707. *
  23708. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $columns
  23709. * @param string $boolean
  23710. * @param bool $not
  23711. * @return \Illuminate\Database\Eloquent\Builder<static>
  23712. * @static
  23713. */
  23714. public static function whereNull($columns, $boolean = 'and', $not = false)
  23715. {
  23716. /** @var \Illuminate\Database\Query\Builder $instance */
  23717. return $instance->whereNull($columns, $boolean, $not);
  23718. }
  23719. /**
  23720. * Add an "or where null" clause to the query.
  23721. *
  23722. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23723. * @return \Illuminate\Database\Eloquent\Builder<static>
  23724. * @static
  23725. */
  23726. public static function orWhereNull($column)
  23727. {
  23728. /** @var \Illuminate\Database\Query\Builder $instance */
  23729. return $instance->orWhereNull($column);
  23730. }
  23731. /**
  23732. * Add a "where not null" clause to the query.
  23733. *
  23734. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $columns
  23735. * @param string $boolean
  23736. * @return \Illuminate\Database\Eloquent\Builder<static>
  23737. * @static
  23738. */
  23739. public static function whereNotNull($columns, $boolean = 'and')
  23740. {
  23741. /** @var \Illuminate\Database\Query\Builder $instance */
  23742. return $instance->whereNotNull($columns, $boolean);
  23743. }
  23744. /**
  23745. * Add a where between statement to the query.
  23746. *
  23747. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23748. * @param string $boolean
  23749. * @param bool $not
  23750. * @return \Illuminate\Database\Eloquent\Builder<static>
  23751. * @static
  23752. */
  23753. public static function whereBetween($column, $values, $boolean = 'and', $not = false)
  23754. {
  23755. /** @var \Illuminate\Database\Query\Builder $instance */
  23756. return $instance->whereBetween($column, $values, $boolean, $not);
  23757. }
  23758. /**
  23759. * Add a where between statement using columns to the query.
  23760. *
  23761. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23762. * @param string $boolean
  23763. * @param bool $not
  23764. * @return \Illuminate\Database\Eloquent\Builder<static>
  23765. * @static
  23766. */
  23767. public static function whereBetweenColumns($column, $values, $boolean = 'and', $not = false)
  23768. {
  23769. /** @var \Illuminate\Database\Query\Builder $instance */
  23770. return $instance->whereBetweenColumns($column, $values, $boolean, $not);
  23771. }
  23772. /**
  23773. * Add an or where between statement to the query.
  23774. *
  23775. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23776. * @return \Illuminate\Database\Eloquent\Builder<static>
  23777. * @static
  23778. */
  23779. public static function orWhereBetween($column, $values)
  23780. {
  23781. /** @var \Illuminate\Database\Query\Builder $instance */
  23782. return $instance->orWhereBetween($column, $values);
  23783. }
  23784. /**
  23785. * Add an or where between statement using columns to the query.
  23786. *
  23787. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23788. * @return \Illuminate\Database\Eloquent\Builder<static>
  23789. * @static
  23790. */
  23791. public static function orWhereBetweenColumns($column, $values)
  23792. {
  23793. /** @var \Illuminate\Database\Query\Builder $instance */
  23794. return $instance->orWhereBetweenColumns($column, $values);
  23795. }
  23796. /**
  23797. * Add a where not between statement to the query.
  23798. *
  23799. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23800. * @param string $boolean
  23801. * @return \Illuminate\Database\Eloquent\Builder<static>
  23802. * @static
  23803. */
  23804. public static function whereNotBetween($column, $values, $boolean = 'and')
  23805. {
  23806. /** @var \Illuminate\Database\Query\Builder $instance */
  23807. return $instance->whereNotBetween($column, $values, $boolean);
  23808. }
  23809. /**
  23810. * Add a where not between statement using columns to the query.
  23811. *
  23812. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23813. * @param string $boolean
  23814. * @return \Illuminate\Database\Eloquent\Builder<static>
  23815. * @static
  23816. */
  23817. public static function whereNotBetweenColumns($column, $values, $boolean = 'and')
  23818. {
  23819. /** @var \Illuminate\Database\Query\Builder $instance */
  23820. return $instance->whereNotBetweenColumns($column, $values, $boolean);
  23821. }
  23822. /**
  23823. * Add an or where not between statement to the query.
  23824. *
  23825. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23826. * @return \Illuminate\Database\Eloquent\Builder<static>
  23827. * @static
  23828. */
  23829. public static function orWhereNotBetween($column, $values)
  23830. {
  23831. /** @var \Illuminate\Database\Query\Builder $instance */
  23832. return $instance->orWhereNotBetween($column, $values);
  23833. }
  23834. /**
  23835. * Add an or where not between statement using columns to the query.
  23836. *
  23837. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23838. * @return \Illuminate\Database\Eloquent\Builder<static>
  23839. * @static
  23840. */
  23841. public static function orWhereNotBetweenColumns($column, $values)
  23842. {
  23843. /** @var \Illuminate\Database\Query\Builder $instance */
  23844. return $instance->orWhereNotBetweenColumns($column, $values);
  23845. }
  23846. /**
  23847. * Add an "or where not null" clause to the query.
  23848. *
  23849. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23850. * @return \Illuminate\Database\Eloquent\Builder<static>
  23851. * @static
  23852. */
  23853. public static function orWhereNotNull($column)
  23854. {
  23855. /** @var \Illuminate\Database\Query\Builder $instance */
  23856. return $instance->orWhereNotNull($column);
  23857. }
  23858. /**
  23859. * Add a "where date" statement to the query.
  23860. *
  23861. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23862. * @param \DateTimeInterface|string|null $operator
  23863. * @param \DateTimeInterface|string|null $value
  23864. * @param string $boolean
  23865. * @return \Illuminate\Database\Eloquent\Builder<static>
  23866. * @static
  23867. */
  23868. public static function whereDate($column, $operator, $value = null, $boolean = 'and')
  23869. {
  23870. /** @var \Illuminate\Database\Query\Builder $instance */
  23871. return $instance->whereDate($column, $operator, $value, $boolean);
  23872. }
  23873. /**
  23874. * Add an "or where date" statement to the query.
  23875. *
  23876. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23877. * @param \DateTimeInterface|string|null $operator
  23878. * @param \DateTimeInterface|string|null $value
  23879. * @return \Illuminate\Database\Eloquent\Builder<static>
  23880. * @static
  23881. */
  23882. public static function orWhereDate($column, $operator, $value = null)
  23883. {
  23884. /** @var \Illuminate\Database\Query\Builder $instance */
  23885. return $instance->orWhereDate($column, $operator, $value);
  23886. }
  23887. /**
  23888. * Add a "where time" statement to the query.
  23889. *
  23890. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23891. * @param \DateTimeInterface|string|null $operator
  23892. * @param \DateTimeInterface|string|null $value
  23893. * @param string $boolean
  23894. * @return \Illuminate\Database\Eloquent\Builder<static>
  23895. * @static
  23896. */
  23897. public static function whereTime($column, $operator, $value = null, $boolean = 'and')
  23898. {
  23899. /** @var \Illuminate\Database\Query\Builder $instance */
  23900. return $instance->whereTime($column, $operator, $value, $boolean);
  23901. }
  23902. /**
  23903. * Add an "or where time" statement to the query.
  23904. *
  23905. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23906. * @param \DateTimeInterface|string|null $operator
  23907. * @param \DateTimeInterface|string|null $value
  23908. * @return \Illuminate\Database\Eloquent\Builder<static>
  23909. * @static
  23910. */
  23911. public static function orWhereTime($column, $operator, $value = null)
  23912. {
  23913. /** @var \Illuminate\Database\Query\Builder $instance */
  23914. return $instance->orWhereTime($column, $operator, $value);
  23915. }
  23916. /**
  23917. * Add a "where day" statement to the query.
  23918. *
  23919. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23920. * @param \DateTimeInterface|string|int|null $operator
  23921. * @param \DateTimeInterface|string|int|null $value
  23922. * @param string $boolean
  23923. * @return \Illuminate\Database\Eloquent\Builder<static>
  23924. * @static
  23925. */
  23926. public static function whereDay($column, $operator, $value = null, $boolean = 'and')
  23927. {
  23928. /** @var \Illuminate\Database\Query\Builder $instance */
  23929. return $instance->whereDay($column, $operator, $value, $boolean);
  23930. }
  23931. /**
  23932. * Add an "or where day" statement to the query.
  23933. *
  23934. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23935. * @param \DateTimeInterface|string|int|null $operator
  23936. * @param \DateTimeInterface|string|int|null $value
  23937. * @return \Illuminate\Database\Eloquent\Builder<static>
  23938. * @static
  23939. */
  23940. public static function orWhereDay($column, $operator, $value = null)
  23941. {
  23942. /** @var \Illuminate\Database\Query\Builder $instance */
  23943. return $instance->orWhereDay($column, $operator, $value);
  23944. }
  23945. /**
  23946. * Add a "where month" statement to the query.
  23947. *
  23948. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23949. * @param \DateTimeInterface|string|int|null $operator
  23950. * @param \DateTimeInterface|string|int|null $value
  23951. * @param string $boolean
  23952. * @return \Illuminate\Database\Eloquent\Builder<static>
  23953. * @static
  23954. */
  23955. public static function whereMonth($column, $operator, $value = null, $boolean = 'and')
  23956. {
  23957. /** @var \Illuminate\Database\Query\Builder $instance */
  23958. return $instance->whereMonth($column, $operator, $value, $boolean);
  23959. }
  23960. /**
  23961. * Add an "or where month" statement to the query.
  23962. *
  23963. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23964. * @param \DateTimeInterface|string|int|null $operator
  23965. * @param \DateTimeInterface|string|int|null $value
  23966. * @return \Illuminate\Database\Eloquent\Builder<static>
  23967. * @static
  23968. */
  23969. public static function orWhereMonth($column, $operator, $value = null)
  23970. {
  23971. /** @var \Illuminate\Database\Query\Builder $instance */
  23972. return $instance->orWhereMonth($column, $operator, $value);
  23973. }
  23974. /**
  23975. * Add a "where year" statement to the query.
  23976. *
  23977. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23978. * @param \DateTimeInterface|string|int|null $operator
  23979. * @param \DateTimeInterface|string|int|null $value
  23980. * @param string $boolean
  23981. * @return \Illuminate\Database\Eloquent\Builder<static>
  23982. * @static
  23983. */
  23984. public static function whereYear($column, $operator, $value = null, $boolean = 'and')
  23985. {
  23986. /** @var \Illuminate\Database\Query\Builder $instance */
  23987. return $instance->whereYear($column, $operator, $value, $boolean);
  23988. }
  23989. /**
  23990. * Add an "or where year" statement to the query.
  23991. *
  23992. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23993. * @param \DateTimeInterface|string|int|null $operator
  23994. * @param \DateTimeInterface|string|int|null $value
  23995. * @return \Illuminate\Database\Eloquent\Builder<static>
  23996. * @static
  23997. */
  23998. public static function orWhereYear($column, $operator, $value = null)
  23999. {
  24000. /** @var \Illuminate\Database\Query\Builder $instance */
  24001. return $instance->orWhereYear($column, $operator, $value);
  24002. }
  24003. /**
  24004. * Add a nested where statement to the query.
  24005. *
  24006. * @param string $boolean
  24007. * @return \Illuminate\Database\Eloquent\Builder<static>
  24008. * @static
  24009. */
  24010. public static function whereNested($callback, $boolean = 'and')
  24011. {
  24012. /** @var \Illuminate\Database\Query\Builder $instance */
  24013. return $instance->whereNested($callback, $boolean);
  24014. }
  24015. /**
  24016. * Create a new query instance for nested where condition.
  24017. *
  24018. * @return \Illuminate\Database\Query\Builder
  24019. * @static
  24020. */
  24021. public static function forNestedWhere()
  24022. {
  24023. /** @var \Illuminate\Database\Query\Builder $instance */
  24024. return $instance->forNestedWhere();
  24025. }
  24026. /**
  24027. * Add another query builder as a nested where to the query builder.
  24028. *
  24029. * @param \Illuminate\Database\Query\Builder $query
  24030. * @param string $boolean
  24031. * @return \Illuminate\Database\Eloquent\Builder<static>
  24032. * @static
  24033. */
  24034. public static function addNestedWhereQuery($query, $boolean = 'and')
  24035. {
  24036. /** @var \Illuminate\Database\Query\Builder $instance */
  24037. return $instance->addNestedWhereQuery($query, $boolean);
  24038. }
  24039. /**
  24040. * Add an exists clause to the query.
  24041. *
  24042. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24043. * @param string $boolean
  24044. * @param bool $not
  24045. * @return \Illuminate\Database\Eloquent\Builder<static>
  24046. * @static
  24047. */
  24048. public static function whereExists($callback, $boolean = 'and', $not = false)
  24049. {
  24050. /** @var \Illuminate\Database\Query\Builder $instance */
  24051. return $instance->whereExists($callback, $boolean, $not);
  24052. }
  24053. /**
  24054. * Add an or exists clause to the query.
  24055. *
  24056. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24057. * @param bool $not
  24058. * @return \Illuminate\Database\Eloquent\Builder<static>
  24059. * @static
  24060. */
  24061. public static function orWhereExists($callback, $not = false)
  24062. {
  24063. /** @var \Illuminate\Database\Query\Builder $instance */
  24064. return $instance->orWhereExists($callback, $not);
  24065. }
  24066. /**
  24067. * Add a where not exists clause to the query.
  24068. *
  24069. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24070. * @param string $boolean
  24071. * @return \Illuminate\Database\Eloquent\Builder<static>
  24072. * @static
  24073. */
  24074. public static function whereNotExists($callback, $boolean = 'and')
  24075. {
  24076. /** @var \Illuminate\Database\Query\Builder $instance */
  24077. return $instance->whereNotExists($callback, $boolean);
  24078. }
  24079. /**
  24080. * Add a where not exists clause to the query.
  24081. *
  24082. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24083. * @return \Illuminate\Database\Eloquent\Builder<static>
  24084. * @static
  24085. */
  24086. public static function orWhereNotExists($callback)
  24087. {
  24088. /** @var \Illuminate\Database\Query\Builder $instance */
  24089. return $instance->orWhereNotExists($callback);
  24090. }
  24091. /**
  24092. * Add an exists clause to the query.
  24093. *
  24094. * @param string $boolean
  24095. * @param bool $not
  24096. * @return \Illuminate\Database\Eloquent\Builder<static>
  24097. * @static
  24098. */
  24099. public static function addWhereExistsQuery($query, $boolean = 'and', $not = false)
  24100. {
  24101. /** @var \Illuminate\Database\Query\Builder $instance */
  24102. return $instance->addWhereExistsQuery($query, $boolean, $not);
  24103. }
  24104. /**
  24105. * Adds a where condition using row values.
  24106. *
  24107. * @param array $columns
  24108. * @param string $operator
  24109. * @param array $values
  24110. * @param string $boolean
  24111. * @return \Illuminate\Database\Eloquent\Builder<static>
  24112. * @throws \InvalidArgumentException
  24113. * @static
  24114. */
  24115. public static function whereRowValues($columns, $operator, $values, $boolean = 'and')
  24116. {
  24117. /** @var \Illuminate\Database\Query\Builder $instance */
  24118. return $instance->whereRowValues($columns, $operator, $values, $boolean);
  24119. }
  24120. /**
  24121. * Adds an or where condition using row values.
  24122. *
  24123. * @param array $columns
  24124. * @param string $operator
  24125. * @param array $values
  24126. * @return \Illuminate\Database\Eloquent\Builder<static>
  24127. * @static
  24128. */
  24129. public static function orWhereRowValues($columns, $operator, $values)
  24130. {
  24131. /** @var \Illuminate\Database\Query\Builder $instance */
  24132. return $instance->orWhereRowValues($columns, $operator, $values);
  24133. }
  24134. /**
  24135. * Add a "where JSON contains" clause to the query.
  24136. *
  24137. * @param string $column
  24138. * @param mixed $value
  24139. * @param string $boolean
  24140. * @param bool $not
  24141. * @return \Illuminate\Database\Eloquent\Builder<static>
  24142. * @static
  24143. */
  24144. public static function whereJsonContains($column, $value, $boolean = 'and', $not = false)
  24145. {
  24146. /** @var \Illuminate\Database\Query\Builder $instance */
  24147. return $instance->whereJsonContains($column, $value, $boolean, $not);
  24148. }
  24149. /**
  24150. * Add an "or where JSON contains" clause to the query.
  24151. *
  24152. * @param string $column
  24153. * @param mixed $value
  24154. * @return \Illuminate\Database\Eloquent\Builder<static>
  24155. * @static
  24156. */
  24157. public static function orWhereJsonContains($column, $value)
  24158. {
  24159. /** @var \Illuminate\Database\Query\Builder $instance */
  24160. return $instance->orWhereJsonContains($column, $value);
  24161. }
  24162. /**
  24163. * Add a "where JSON not contains" clause to the query.
  24164. *
  24165. * @param string $column
  24166. * @param mixed $value
  24167. * @param string $boolean
  24168. * @return \Illuminate\Database\Eloquent\Builder<static>
  24169. * @static
  24170. */
  24171. public static function whereJsonDoesntContain($column, $value, $boolean = 'and')
  24172. {
  24173. /** @var \Illuminate\Database\Query\Builder $instance */
  24174. return $instance->whereJsonDoesntContain($column, $value, $boolean);
  24175. }
  24176. /**
  24177. * Add an "or where JSON not contains" clause to the query.
  24178. *
  24179. * @param string $column
  24180. * @param mixed $value
  24181. * @return \Illuminate\Database\Eloquent\Builder<static>
  24182. * @static
  24183. */
  24184. public static function orWhereJsonDoesntContain($column, $value)
  24185. {
  24186. /** @var \Illuminate\Database\Query\Builder $instance */
  24187. return $instance->orWhereJsonDoesntContain($column, $value);
  24188. }
  24189. /**
  24190. * Add a "where JSON overlaps" clause to the query.
  24191. *
  24192. * @param string $column
  24193. * @param mixed $value
  24194. * @param string $boolean
  24195. * @param bool $not
  24196. * @return \Illuminate\Database\Eloquent\Builder<static>
  24197. * @static
  24198. */
  24199. public static function whereJsonOverlaps($column, $value, $boolean = 'and', $not = false)
  24200. {
  24201. /** @var \Illuminate\Database\Query\Builder $instance */
  24202. return $instance->whereJsonOverlaps($column, $value, $boolean, $not);
  24203. }
  24204. /**
  24205. * Add an "or where JSON overlaps" clause to the query.
  24206. *
  24207. * @param string $column
  24208. * @param mixed $value
  24209. * @return \Illuminate\Database\Eloquent\Builder<static>
  24210. * @static
  24211. */
  24212. public static function orWhereJsonOverlaps($column, $value)
  24213. {
  24214. /** @var \Illuminate\Database\Query\Builder $instance */
  24215. return $instance->orWhereJsonOverlaps($column, $value);
  24216. }
  24217. /**
  24218. * Add a "where JSON not overlap" clause to the query.
  24219. *
  24220. * @param string $column
  24221. * @param mixed $value
  24222. * @param string $boolean
  24223. * @return \Illuminate\Database\Eloquent\Builder<static>
  24224. * @static
  24225. */
  24226. public static function whereJsonDoesntOverlap($column, $value, $boolean = 'and')
  24227. {
  24228. /** @var \Illuminate\Database\Query\Builder $instance */
  24229. return $instance->whereJsonDoesntOverlap($column, $value, $boolean);
  24230. }
  24231. /**
  24232. * Add an "or where JSON not overlap" clause to the query.
  24233. *
  24234. * @param string $column
  24235. * @param mixed $value
  24236. * @return \Illuminate\Database\Eloquent\Builder<static>
  24237. * @static
  24238. */
  24239. public static function orWhereJsonDoesntOverlap($column, $value)
  24240. {
  24241. /** @var \Illuminate\Database\Query\Builder $instance */
  24242. return $instance->orWhereJsonDoesntOverlap($column, $value);
  24243. }
  24244. /**
  24245. * Add a clause that determines if a JSON path exists to the query.
  24246. *
  24247. * @param string $column
  24248. * @param string $boolean
  24249. * @param bool $not
  24250. * @return \Illuminate\Database\Eloquent\Builder<static>
  24251. * @static
  24252. */
  24253. public static function whereJsonContainsKey($column, $boolean = 'and', $not = false)
  24254. {
  24255. /** @var \Illuminate\Database\Query\Builder $instance */
  24256. return $instance->whereJsonContainsKey($column, $boolean, $not);
  24257. }
  24258. /**
  24259. * Add an "or" clause that determines if a JSON path exists to the query.
  24260. *
  24261. * @param string $column
  24262. * @return \Illuminate\Database\Eloquent\Builder<static>
  24263. * @static
  24264. */
  24265. public static function orWhereJsonContainsKey($column)
  24266. {
  24267. /** @var \Illuminate\Database\Query\Builder $instance */
  24268. return $instance->orWhereJsonContainsKey($column);
  24269. }
  24270. /**
  24271. * Add a clause that determines if a JSON path does not exist to the query.
  24272. *
  24273. * @param string $column
  24274. * @param string $boolean
  24275. * @return \Illuminate\Database\Eloquent\Builder<static>
  24276. * @static
  24277. */
  24278. public static function whereJsonDoesntContainKey($column, $boolean = 'and')
  24279. {
  24280. /** @var \Illuminate\Database\Query\Builder $instance */
  24281. return $instance->whereJsonDoesntContainKey($column, $boolean);
  24282. }
  24283. /**
  24284. * Add an "or" clause that determines if a JSON path does not exist to the query.
  24285. *
  24286. * @param string $column
  24287. * @return \Illuminate\Database\Eloquent\Builder<static>
  24288. * @static
  24289. */
  24290. public static function orWhereJsonDoesntContainKey($column)
  24291. {
  24292. /** @var \Illuminate\Database\Query\Builder $instance */
  24293. return $instance->orWhereJsonDoesntContainKey($column);
  24294. }
  24295. /**
  24296. * Add a "where JSON length" clause to the query.
  24297. *
  24298. * @param string $column
  24299. * @param mixed $operator
  24300. * @param mixed $value
  24301. * @param string $boolean
  24302. * @return \Illuminate\Database\Eloquent\Builder<static>
  24303. * @static
  24304. */
  24305. public static function whereJsonLength($column, $operator, $value = null, $boolean = 'and')
  24306. {
  24307. /** @var \Illuminate\Database\Query\Builder $instance */
  24308. return $instance->whereJsonLength($column, $operator, $value, $boolean);
  24309. }
  24310. /**
  24311. * Add an "or where JSON length" clause to the query.
  24312. *
  24313. * @param string $column
  24314. * @param mixed $operator
  24315. * @param mixed $value
  24316. * @return \Illuminate\Database\Eloquent\Builder<static>
  24317. * @static
  24318. */
  24319. public static function orWhereJsonLength($column, $operator, $value = null)
  24320. {
  24321. /** @var \Illuminate\Database\Query\Builder $instance */
  24322. return $instance->orWhereJsonLength($column, $operator, $value);
  24323. }
  24324. /**
  24325. * Handles dynamic "where" clauses to the query.
  24326. *
  24327. * @param string $method
  24328. * @param array $parameters
  24329. * @return \Illuminate\Database\Eloquent\Builder<static>
  24330. * @static
  24331. */
  24332. public static function dynamicWhere($method, $parameters)
  24333. {
  24334. /** @var \Illuminate\Database\Query\Builder $instance */
  24335. return $instance->dynamicWhere($method, $parameters);
  24336. }
  24337. /**
  24338. * Add a "where fulltext" clause to the query.
  24339. *
  24340. * @param string|string[] $columns
  24341. * @param string $value
  24342. * @param string $boolean
  24343. * @return \Illuminate\Database\Eloquent\Builder<static>
  24344. * @static
  24345. */
  24346. public static function whereFullText($columns, $value, $options = [], $boolean = 'and')
  24347. {
  24348. /** @var \Illuminate\Database\Query\Builder $instance */
  24349. return $instance->whereFullText($columns, $value, $options, $boolean);
  24350. }
  24351. /**
  24352. * Add a "or where fulltext" clause to the query.
  24353. *
  24354. * @param string|string[] $columns
  24355. * @param string $value
  24356. * @return \Illuminate\Database\Eloquent\Builder<static>
  24357. * @static
  24358. */
  24359. public static function orWhereFullText($columns, $value, $options = [])
  24360. {
  24361. /** @var \Illuminate\Database\Query\Builder $instance */
  24362. return $instance->orWhereFullText($columns, $value, $options);
  24363. }
  24364. /**
  24365. * Add a "where" clause to the query for multiple columns with "and" conditions between them.
  24366. *
  24367. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24368. * @param mixed $operator
  24369. * @param mixed $value
  24370. * @param string $boolean
  24371. * @return \Illuminate\Database\Eloquent\Builder<static>
  24372. * @static
  24373. */
  24374. public static function whereAll($columns, $operator = null, $value = null, $boolean = 'and')
  24375. {
  24376. /** @var \Illuminate\Database\Query\Builder $instance */
  24377. return $instance->whereAll($columns, $operator, $value, $boolean);
  24378. }
  24379. /**
  24380. * Add an "or where" clause to the query for multiple columns with "and" conditions between them.
  24381. *
  24382. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24383. * @param mixed $operator
  24384. * @param mixed $value
  24385. * @return \Illuminate\Database\Eloquent\Builder<static>
  24386. * @static
  24387. */
  24388. public static function orWhereAll($columns, $operator = null, $value = null)
  24389. {
  24390. /** @var \Illuminate\Database\Query\Builder $instance */
  24391. return $instance->orWhereAll($columns, $operator, $value);
  24392. }
  24393. /**
  24394. * Add a "where" clause to the query for multiple columns with "or" conditions between them.
  24395. *
  24396. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24397. * @param mixed $operator
  24398. * @param mixed $value
  24399. * @param string $boolean
  24400. * @return \Illuminate\Database\Eloquent\Builder<static>
  24401. * @static
  24402. */
  24403. public static function whereAny($columns, $operator = null, $value = null, $boolean = 'and')
  24404. {
  24405. /** @var \Illuminate\Database\Query\Builder $instance */
  24406. return $instance->whereAny($columns, $operator, $value, $boolean);
  24407. }
  24408. /**
  24409. * Add an "or where" clause to the query for multiple columns with "or" conditions between them.
  24410. *
  24411. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24412. * @param mixed $operator
  24413. * @param mixed $value
  24414. * @return \Illuminate\Database\Eloquent\Builder<static>
  24415. * @static
  24416. */
  24417. public static function orWhereAny($columns, $operator = null, $value = null)
  24418. {
  24419. /** @var \Illuminate\Database\Query\Builder $instance */
  24420. return $instance->orWhereAny($columns, $operator, $value);
  24421. }
  24422. /**
  24423. * Add a "where not" clause to the query for multiple columns where none of the conditions should be true.
  24424. *
  24425. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24426. * @param mixed $operator
  24427. * @param mixed $value
  24428. * @param string $boolean
  24429. * @return \Illuminate\Database\Eloquent\Builder<static>
  24430. * @static
  24431. */
  24432. public static function whereNone($columns, $operator = null, $value = null, $boolean = 'and')
  24433. {
  24434. /** @var \Illuminate\Database\Query\Builder $instance */
  24435. return $instance->whereNone($columns, $operator, $value, $boolean);
  24436. }
  24437. /**
  24438. * Add an "or where not" clause to the query for multiple columns where none of the conditions should be true.
  24439. *
  24440. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24441. * @param mixed $operator
  24442. * @param mixed $value
  24443. * @return \Illuminate\Database\Eloquent\Builder<static>
  24444. * @static
  24445. */
  24446. public static function orWhereNone($columns, $operator = null, $value = null)
  24447. {
  24448. /** @var \Illuminate\Database\Query\Builder $instance */
  24449. return $instance->orWhereNone($columns, $operator, $value);
  24450. }
  24451. /**
  24452. * Add a "group by" clause to the query.
  24453. *
  24454. * @param array|\Illuminate\Contracts\Database\Query\Expression|string $groups
  24455. * @return \Illuminate\Database\Eloquent\Builder<static>
  24456. * @static
  24457. */
  24458. public static function groupBy(...$groups)
  24459. {
  24460. /** @var \Illuminate\Database\Query\Builder $instance */
  24461. return $instance->groupBy(...$groups);
  24462. }
  24463. /**
  24464. * Add a raw groupBy clause to the query.
  24465. *
  24466. * @param string $sql
  24467. * @return \Illuminate\Database\Eloquent\Builder<static>
  24468. * @static
  24469. */
  24470. public static function groupByRaw($sql, $bindings = [])
  24471. {
  24472. /** @var \Illuminate\Database\Query\Builder $instance */
  24473. return $instance->groupByRaw($sql, $bindings);
  24474. }
  24475. /**
  24476. * Add a "having" clause to the query.
  24477. *
  24478. * @param \Illuminate\Contracts\Database\Query\Expression|\Closure|string $column
  24479. * @param \DateTimeInterface|string|int|float|null $operator
  24480. * @param \Illuminate\Contracts\Database\Query\Expression|\DateTimeInterface|string|int|float|null $value
  24481. * @param string $boolean
  24482. * @return \Illuminate\Database\Eloquent\Builder<static>
  24483. * @static
  24484. */
  24485. public static function having($column, $operator = null, $value = null, $boolean = 'and')
  24486. {
  24487. /** @var \Illuminate\Database\Query\Builder $instance */
  24488. return $instance->having($column, $operator, $value, $boolean);
  24489. }
  24490. /**
  24491. * Add an "or having" clause to the query.
  24492. *
  24493. * @param \Illuminate\Contracts\Database\Query\Expression|\Closure|string $column
  24494. * @param \DateTimeInterface|string|int|float|null $operator
  24495. * @param \Illuminate\Contracts\Database\Query\Expression|\DateTimeInterface|string|int|float|null $value
  24496. * @return \Illuminate\Database\Eloquent\Builder<static>
  24497. * @static
  24498. */
  24499. public static function orHaving($column, $operator = null, $value = null)
  24500. {
  24501. /** @var \Illuminate\Database\Query\Builder $instance */
  24502. return $instance->orHaving($column, $operator, $value);
  24503. }
  24504. /**
  24505. * Add a nested having statement to the query.
  24506. *
  24507. * @param string $boolean
  24508. * @return \Illuminate\Database\Eloquent\Builder<static>
  24509. * @static
  24510. */
  24511. public static function havingNested($callback, $boolean = 'and')
  24512. {
  24513. /** @var \Illuminate\Database\Query\Builder $instance */
  24514. return $instance->havingNested($callback, $boolean);
  24515. }
  24516. /**
  24517. * Add another query builder as a nested having to the query builder.
  24518. *
  24519. * @param \Illuminate\Database\Query\Builder $query
  24520. * @param string $boolean
  24521. * @return \Illuminate\Database\Eloquent\Builder<static>
  24522. * @static
  24523. */
  24524. public static function addNestedHavingQuery($query, $boolean = 'and')
  24525. {
  24526. /** @var \Illuminate\Database\Query\Builder $instance */
  24527. return $instance->addNestedHavingQuery($query, $boolean);
  24528. }
  24529. /**
  24530. * Add a "having null" clause to the query.
  24531. *
  24532. * @param array|string $columns
  24533. * @param string $boolean
  24534. * @param bool $not
  24535. * @return \Illuminate\Database\Eloquent\Builder<static>
  24536. * @static
  24537. */
  24538. public static function havingNull($columns, $boolean = 'and', $not = false)
  24539. {
  24540. /** @var \Illuminate\Database\Query\Builder $instance */
  24541. return $instance->havingNull($columns, $boolean, $not);
  24542. }
  24543. /**
  24544. * Add an "or having null" clause to the query.
  24545. *
  24546. * @param string $column
  24547. * @return \Illuminate\Database\Eloquent\Builder<static>
  24548. * @static
  24549. */
  24550. public static function orHavingNull($column)
  24551. {
  24552. /** @var \Illuminate\Database\Query\Builder $instance */
  24553. return $instance->orHavingNull($column);
  24554. }
  24555. /**
  24556. * Add a "having not null" clause to the query.
  24557. *
  24558. * @param array|string $columns
  24559. * @param string $boolean
  24560. * @return \Illuminate\Database\Eloquent\Builder<static>
  24561. * @static
  24562. */
  24563. public static function havingNotNull($columns, $boolean = 'and')
  24564. {
  24565. /** @var \Illuminate\Database\Query\Builder $instance */
  24566. return $instance->havingNotNull($columns, $boolean);
  24567. }
  24568. /**
  24569. * Add an "or having not null" clause to the query.
  24570. *
  24571. * @param string $column
  24572. * @return \Illuminate\Database\Eloquent\Builder<static>
  24573. * @static
  24574. */
  24575. public static function orHavingNotNull($column)
  24576. {
  24577. /** @var \Illuminate\Database\Query\Builder $instance */
  24578. return $instance->orHavingNotNull($column);
  24579. }
  24580. /**
  24581. * Add a "having between " clause to the query.
  24582. *
  24583. * @param string $column
  24584. * @param string $boolean
  24585. * @param bool $not
  24586. * @return \Illuminate\Database\Eloquent\Builder<static>
  24587. * @static
  24588. */
  24589. public static function havingBetween($column, $values, $boolean = 'and', $not = false)
  24590. {
  24591. /** @var \Illuminate\Database\Query\Builder $instance */
  24592. return $instance->havingBetween($column, $values, $boolean, $not);
  24593. }
  24594. /**
  24595. * Add a raw having clause to the query.
  24596. *
  24597. * @param string $sql
  24598. * @param string $boolean
  24599. * @return \Illuminate\Database\Eloquent\Builder<static>
  24600. * @static
  24601. */
  24602. public static function havingRaw($sql, $bindings = [], $boolean = 'and')
  24603. {
  24604. /** @var \Illuminate\Database\Query\Builder $instance */
  24605. return $instance->havingRaw($sql, $bindings, $boolean);
  24606. }
  24607. /**
  24608. * Add a raw or having clause to the query.
  24609. *
  24610. * @param string $sql
  24611. * @return \Illuminate\Database\Eloquent\Builder<static>
  24612. * @static
  24613. */
  24614. public static function orHavingRaw($sql, $bindings = [])
  24615. {
  24616. /** @var \Illuminate\Database\Query\Builder $instance */
  24617. return $instance->orHavingRaw($sql, $bindings);
  24618. }
  24619. /**
  24620. * Add an "order by" clause to the query.
  24621. *
  24622. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column
  24623. * @param string $direction
  24624. * @return \Illuminate\Database\Eloquent\Builder<static>
  24625. * @throws \InvalidArgumentException
  24626. * @static
  24627. */
  24628. public static function orderBy($column, $direction = 'asc')
  24629. {
  24630. /** @var \Illuminate\Database\Query\Builder $instance */
  24631. return $instance->orderBy($column, $direction);
  24632. }
  24633. /**
  24634. * Add a descending "order by" clause to the query.
  24635. *
  24636. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column
  24637. * @return \Illuminate\Database\Eloquent\Builder<static>
  24638. * @static
  24639. */
  24640. public static function orderByDesc($column)
  24641. {
  24642. /** @var \Illuminate\Database\Query\Builder $instance */
  24643. return $instance->orderByDesc($column);
  24644. }
  24645. /**
  24646. * Put the query's results in random order.
  24647. *
  24648. * @param string|int $seed
  24649. * @return \Illuminate\Database\Eloquent\Builder<static>
  24650. * @static
  24651. */
  24652. public static function inRandomOrder($seed = '')
  24653. {
  24654. /** @var \Illuminate\Database\Query\Builder $instance */
  24655. return $instance->inRandomOrder($seed);
  24656. }
  24657. /**
  24658. * Add a raw "order by" clause to the query.
  24659. *
  24660. * @param string $sql
  24661. * @param array $bindings
  24662. * @return \Illuminate\Database\Eloquent\Builder<static>
  24663. * @static
  24664. */
  24665. public static function orderByRaw($sql, $bindings = [])
  24666. {
  24667. /** @var \Illuminate\Database\Query\Builder $instance */
  24668. return $instance->orderByRaw($sql, $bindings);
  24669. }
  24670. /**
  24671. * Alias to set the "offset" value of the query.
  24672. *
  24673. * @param int $value
  24674. * @return \Illuminate\Database\Eloquent\Builder<static>
  24675. * @static
  24676. */
  24677. public static function skip($value)
  24678. {
  24679. /** @var \Illuminate\Database\Query\Builder $instance */
  24680. return $instance->skip($value);
  24681. }
  24682. /**
  24683. * Set the "offset" value of the query.
  24684. *
  24685. * @param int $value
  24686. * @return \Illuminate\Database\Eloquent\Builder<static>
  24687. * @static
  24688. */
  24689. public static function offset($value)
  24690. {
  24691. /** @var \Illuminate\Database\Query\Builder $instance */
  24692. return $instance->offset($value);
  24693. }
  24694. /**
  24695. * Alias to set the "limit" value of the query.
  24696. *
  24697. * @param int $value
  24698. * @return \Illuminate\Database\Eloquent\Builder<static>
  24699. * @static
  24700. */
  24701. public static function take($value)
  24702. {
  24703. /** @var \Illuminate\Database\Query\Builder $instance */
  24704. return $instance->take($value);
  24705. }
  24706. /**
  24707. * Set the "limit" value of the query.
  24708. *
  24709. * @param int $value
  24710. * @return \Illuminate\Database\Eloquent\Builder<static>
  24711. * @static
  24712. */
  24713. public static function limit($value)
  24714. {
  24715. /** @var \Illuminate\Database\Query\Builder $instance */
  24716. return $instance->limit($value);
  24717. }
  24718. /**
  24719. * Add a "group limit" clause to the query.
  24720. *
  24721. * @param int $value
  24722. * @param string $column
  24723. * @return \Illuminate\Database\Eloquent\Builder<static>
  24724. * @static
  24725. */
  24726. public static function groupLimit($value, $column)
  24727. {
  24728. /** @var \Illuminate\Database\Query\Builder $instance */
  24729. return $instance->groupLimit($value, $column);
  24730. }
  24731. /**
  24732. * Set the limit and offset for a given page.
  24733. *
  24734. * @param int $page
  24735. * @param int $perPage
  24736. * @return \Illuminate\Database\Eloquent\Builder<static>
  24737. * @static
  24738. */
  24739. public static function forPage($page, $perPage = 15)
  24740. {
  24741. /** @var \Illuminate\Database\Query\Builder $instance */
  24742. return $instance->forPage($page, $perPage);
  24743. }
  24744. /**
  24745. * Constrain the query to the previous "page" of results before a given ID.
  24746. *
  24747. * @param int $perPage
  24748. * @param int|null $lastId
  24749. * @param string $column
  24750. * @return \Illuminate\Database\Eloquent\Builder<static>
  24751. * @static
  24752. */
  24753. public static function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id')
  24754. {
  24755. /** @var \Illuminate\Database\Query\Builder $instance */
  24756. return $instance->forPageBeforeId($perPage, $lastId, $column);
  24757. }
  24758. /**
  24759. * Constrain the query to the next "page" of results after a given ID.
  24760. *
  24761. * @param int $perPage
  24762. * @param int|null $lastId
  24763. * @param string $column
  24764. * @return \Illuminate\Database\Eloquent\Builder<static>
  24765. * @static
  24766. */
  24767. public static function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
  24768. {
  24769. /** @var \Illuminate\Database\Query\Builder $instance */
  24770. return $instance->forPageAfterId($perPage, $lastId, $column);
  24771. }
  24772. /**
  24773. * Remove all existing orders and optionally add a new order.
  24774. *
  24775. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string|null $column
  24776. * @param string $direction
  24777. * @return \Illuminate\Database\Eloquent\Builder<static>
  24778. * @static
  24779. */
  24780. public static function reorder($column = null, $direction = 'asc')
  24781. {
  24782. /** @var \Illuminate\Database\Query\Builder $instance */
  24783. return $instance->reorder($column, $direction);
  24784. }
  24785. /**
  24786. * Add descending "reorder" clause to the query.
  24787. *
  24788. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string|null $column
  24789. * @return \Illuminate\Database\Eloquent\Builder<static>
  24790. * @static
  24791. */
  24792. public static function reorderDesc($column)
  24793. {
  24794. /** @var \Illuminate\Database\Query\Builder $instance */
  24795. return $instance->reorderDesc($column);
  24796. }
  24797. /**
  24798. * Add a union statement to the query.
  24799. *
  24800. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query
  24801. * @param bool $all
  24802. * @return \Illuminate\Database\Eloquent\Builder<static>
  24803. * @static
  24804. */
  24805. public static function union($query, $all = false)
  24806. {
  24807. /** @var \Illuminate\Database\Query\Builder $instance */
  24808. return $instance->union($query, $all);
  24809. }
  24810. /**
  24811. * Add a union all statement to the query.
  24812. *
  24813. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query
  24814. * @return \Illuminate\Database\Eloquent\Builder<static>
  24815. * @static
  24816. */
  24817. public static function unionAll($query)
  24818. {
  24819. /** @var \Illuminate\Database\Query\Builder $instance */
  24820. return $instance->unionAll($query);
  24821. }
  24822. /**
  24823. * Lock the selected rows in the table.
  24824. *
  24825. * @param string|bool $value
  24826. * @return \Illuminate\Database\Eloquent\Builder<static>
  24827. * @static
  24828. */
  24829. public static function lock($value = true)
  24830. {
  24831. /** @var \Illuminate\Database\Query\Builder $instance */
  24832. return $instance->lock($value);
  24833. }
  24834. /**
  24835. * Lock the selected rows in the table for updating.
  24836. *
  24837. * @return \Illuminate\Database\Eloquent\Builder<static>
  24838. * @static
  24839. */
  24840. public static function lockForUpdate()
  24841. {
  24842. /** @var \Illuminate\Database\Query\Builder $instance */
  24843. return $instance->lockForUpdate();
  24844. }
  24845. /**
  24846. * Share lock the selected rows in the table.
  24847. *
  24848. * @return \Illuminate\Database\Eloquent\Builder<static>
  24849. * @static
  24850. */
  24851. public static function sharedLock()
  24852. {
  24853. /** @var \Illuminate\Database\Query\Builder $instance */
  24854. return $instance->sharedLock();
  24855. }
  24856. /**
  24857. * Register a closure to be invoked before the query is executed.
  24858. *
  24859. * @return \Illuminate\Database\Eloquent\Builder<static>
  24860. * @static
  24861. */
  24862. public static function beforeQuery($callback)
  24863. {
  24864. /** @var \Illuminate\Database\Query\Builder $instance */
  24865. return $instance->beforeQuery($callback);
  24866. }
  24867. /**
  24868. * Invoke the "before query" modification callbacks.
  24869. *
  24870. * @return void
  24871. * @static
  24872. */
  24873. public static function applyBeforeQueryCallbacks()
  24874. {
  24875. /** @var \Illuminate\Database\Query\Builder $instance */
  24876. $instance->applyBeforeQueryCallbacks();
  24877. }
  24878. /**
  24879. * Get the SQL representation of the query.
  24880. *
  24881. * @return string
  24882. * @static
  24883. */
  24884. public static function toSql()
  24885. {
  24886. /** @var \Illuminate\Database\Query\Builder $instance */
  24887. return $instance->toSql();
  24888. }
  24889. /**
  24890. * Get the raw SQL representation of the query with embedded bindings.
  24891. *
  24892. * @return string
  24893. * @static
  24894. */
  24895. public static function toRawSql()
  24896. {
  24897. /** @var \Illuminate\Database\Query\Builder $instance */
  24898. return $instance->toRawSql();
  24899. }
  24900. /**
  24901. * Get a single expression value from the first result of a query.
  24902. *
  24903. * @return mixed
  24904. * @static
  24905. */
  24906. public static function rawValue($expression, $bindings = [])
  24907. {
  24908. /** @var \Illuminate\Database\Query\Builder $instance */
  24909. return $instance->rawValue($expression, $bindings);
  24910. }
  24911. /**
  24912. * Get the count of the total records for the paginator.
  24913. *
  24914. * @param array<string|\Illuminate\Contracts\Database\Query\Expression> $columns
  24915. * @return int<0, max>
  24916. * @static
  24917. */
  24918. public static function getCountForPagination($columns = [])
  24919. {
  24920. /** @var \Illuminate\Database\Query\Builder $instance */
  24921. return $instance->getCountForPagination($columns);
  24922. }
  24923. /**
  24924. * Concatenate values of a given column as a string.
  24925. *
  24926. * @param string $column
  24927. * @param string $glue
  24928. * @return string
  24929. * @static
  24930. */
  24931. public static function implode($column, $glue = '')
  24932. {
  24933. /** @var \Illuminate\Database\Query\Builder $instance */
  24934. return $instance->implode($column, $glue);
  24935. }
  24936. /**
  24937. * Determine if any rows exist for the current query.
  24938. *
  24939. * @return bool
  24940. * @static
  24941. */
  24942. public static function exists()
  24943. {
  24944. /** @var \Illuminate\Database\Query\Builder $instance */
  24945. return $instance->exists();
  24946. }
  24947. /**
  24948. * Determine if no rows exist for the current query.
  24949. *
  24950. * @return bool
  24951. * @static
  24952. */
  24953. public static function doesntExist()
  24954. {
  24955. /** @var \Illuminate\Database\Query\Builder $instance */
  24956. return $instance->doesntExist();
  24957. }
  24958. /**
  24959. * Execute the given callback if no rows exist for the current query.
  24960. *
  24961. * @return mixed
  24962. * @static
  24963. */
  24964. public static function existsOr($callback)
  24965. {
  24966. /** @var \Illuminate\Database\Query\Builder $instance */
  24967. return $instance->existsOr($callback);
  24968. }
  24969. /**
  24970. * Execute the given callback if rows exist for the current query.
  24971. *
  24972. * @return mixed
  24973. * @static
  24974. */
  24975. public static function doesntExistOr($callback)
  24976. {
  24977. /** @var \Illuminate\Database\Query\Builder $instance */
  24978. return $instance->doesntExistOr($callback);
  24979. }
  24980. /**
  24981. * Retrieve the "count" result of the query.
  24982. *
  24983. * @param \Illuminate\Contracts\Database\Query\Expression|string $columns
  24984. * @return int<0, max>
  24985. * @static
  24986. */
  24987. public static function count($columns = '*')
  24988. {
  24989. /** @var \Illuminate\Database\Query\Builder $instance */
  24990. return $instance->count($columns);
  24991. }
  24992. /**
  24993. * Retrieve the minimum value of a given column.
  24994. *
  24995. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24996. * @return mixed
  24997. * @static
  24998. */
  24999. public static function min($column)
  25000. {
  25001. /** @var \Illuminate\Database\Query\Builder $instance */
  25002. return $instance->min($column);
  25003. }
  25004. /**
  25005. * Retrieve the maximum value of a given column.
  25006. *
  25007. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25008. * @return mixed
  25009. * @static
  25010. */
  25011. public static function max($column)
  25012. {
  25013. /** @var \Illuminate\Database\Query\Builder $instance */
  25014. return $instance->max($column);
  25015. }
  25016. /**
  25017. * Retrieve the sum of the values of a given column.
  25018. *
  25019. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25020. * @return mixed
  25021. * @static
  25022. */
  25023. public static function sum($column)
  25024. {
  25025. /** @var \Illuminate\Database\Query\Builder $instance */
  25026. return $instance->sum($column);
  25027. }
  25028. /**
  25029. * Retrieve the average of the values of a given column.
  25030. *
  25031. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25032. * @return mixed
  25033. * @static
  25034. */
  25035. public static function avg($column)
  25036. {
  25037. /** @var \Illuminate\Database\Query\Builder $instance */
  25038. return $instance->avg($column);
  25039. }
  25040. /**
  25041. * Alias for the "avg" method.
  25042. *
  25043. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25044. * @return mixed
  25045. * @static
  25046. */
  25047. public static function average($column)
  25048. {
  25049. /** @var \Illuminate\Database\Query\Builder $instance */
  25050. return $instance->average($column);
  25051. }
  25052. /**
  25053. * Execute an aggregate function on the database.
  25054. *
  25055. * @param string $function
  25056. * @param array $columns
  25057. * @return mixed
  25058. * @static
  25059. */
  25060. public static function aggregate($function, $columns = [])
  25061. {
  25062. /** @var \Illuminate\Database\Query\Builder $instance */
  25063. return $instance->aggregate($function, $columns);
  25064. }
  25065. /**
  25066. * Execute a numeric aggregate function on the database.
  25067. *
  25068. * @param string $function
  25069. * @param array $columns
  25070. * @return float|int
  25071. * @static
  25072. */
  25073. public static function numericAggregate($function, $columns = [])
  25074. {
  25075. /** @var \Illuminate\Database\Query\Builder $instance */
  25076. return $instance->numericAggregate($function, $columns);
  25077. }
  25078. /**
  25079. * Insert new records into the database.
  25080. *
  25081. * @return bool
  25082. * @static
  25083. */
  25084. public static function insert($values)
  25085. {
  25086. /** @var \Illuminate\Database\Query\Builder $instance */
  25087. return $instance->insert($values);
  25088. }
  25089. /**
  25090. * Insert new records into the database while ignoring errors.
  25091. *
  25092. * @return int<0, max>
  25093. * @static
  25094. */
  25095. public static function insertOrIgnore($values)
  25096. {
  25097. /** @var \Illuminate\Database\Query\Builder $instance */
  25098. return $instance->insertOrIgnore($values);
  25099. }
  25100. /**
  25101. * Insert a new record and get the value of the primary key.
  25102. *
  25103. * @param string|null $sequence
  25104. * @return int
  25105. * @static
  25106. */
  25107. public static function insertGetId($values, $sequence = null)
  25108. {
  25109. /** @var \Illuminate\Database\Query\Builder $instance */
  25110. return $instance->insertGetId($values, $sequence);
  25111. }
  25112. /**
  25113. * Insert new records into the table using a subquery.
  25114. *
  25115. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  25116. * @return int
  25117. * @static
  25118. */
  25119. public static function insertUsing($columns, $query)
  25120. {
  25121. /** @var \Illuminate\Database\Query\Builder $instance */
  25122. return $instance->insertUsing($columns, $query);
  25123. }
  25124. /**
  25125. * Insert new records into the table using a subquery while ignoring errors.
  25126. *
  25127. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  25128. * @return int
  25129. * @static
  25130. */
  25131. public static function insertOrIgnoreUsing($columns, $query)
  25132. {
  25133. /** @var \Illuminate\Database\Query\Builder $instance */
  25134. return $instance->insertOrIgnoreUsing($columns, $query);
  25135. }
  25136. /**
  25137. * Update records in a PostgreSQL database using the update from syntax.
  25138. *
  25139. * @return int
  25140. * @static
  25141. */
  25142. public static function updateFrom($values)
  25143. {
  25144. /** @var \Illuminate\Database\Query\Builder $instance */
  25145. return $instance->updateFrom($values);
  25146. }
  25147. /**
  25148. * Insert or update a record matching the attributes, and fill it with values.
  25149. *
  25150. * @return bool
  25151. * @static
  25152. */
  25153. public static function updateOrInsert($attributes, $values = [])
  25154. {
  25155. /** @var \Illuminate\Database\Query\Builder $instance */
  25156. return $instance->updateOrInsert($attributes, $values);
  25157. }
  25158. /**
  25159. * Increment the given column's values by the given amounts.
  25160. *
  25161. * @param array<string, float|int|numeric-string> $columns
  25162. * @param array<string, mixed> $extra
  25163. * @return int<0, max>
  25164. * @throws \InvalidArgumentException
  25165. * @static
  25166. */
  25167. public static function incrementEach($columns, $extra = [])
  25168. {
  25169. /** @var \Illuminate\Database\Query\Builder $instance */
  25170. return $instance->incrementEach($columns, $extra);
  25171. }
  25172. /**
  25173. * Decrement the given column's values by the given amounts.
  25174. *
  25175. * @param array<string, float|int|numeric-string> $columns
  25176. * @param array<string, mixed> $extra
  25177. * @return int<0, max>
  25178. * @throws \InvalidArgumentException
  25179. * @static
  25180. */
  25181. public static function decrementEach($columns, $extra = [])
  25182. {
  25183. /** @var \Illuminate\Database\Query\Builder $instance */
  25184. return $instance->decrementEach($columns, $extra);
  25185. }
  25186. /**
  25187. * Run a truncate statement on the table.
  25188. *
  25189. * @return void
  25190. * @static
  25191. */
  25192. public static function truncate()
  25193. {
  25194. /** @var \Illuminate\Database\Query\Builder $instance */
  25195. $instance->truncate();
  25196. }
  25197. /**
  25198. * Get all of the query builder's columns in a text-only array with all expressions evaluated.
  25199. *
  25200. * @return list<string>
  25201. * @static
  25202. */
  25203. public static function getColumns()
  25204. {
  25205. /** @var \Illuminate\Database\Query\Builder $instance */
  25206. return $instance->getColumns();
  25207. }
  25208. /**
  25209. * Create a raw database expression.
  25210. *
  25211. * @param mixed $value
  25212. * @return \Illuminate\Contracts\Database\Query\Expression
  25213. * @static
  25214. */
  25215. public static function raw($value)
  25216. {
  25217. /** @var \Illuminate\Database\Query\Builder $instance */
  25218. return $instance->raw($value);
  25219. }
  25220. /**
  25221. * Get the current query value bindings in a flattened array.
  25222. *
  25223. * @return list<mixed>
  25224. * @static
  25225. */
  25226. public static function getBindings()
  25227. {
  25228. /** @var \Illuminate\Database\Query\Builder $instance */
  25229. return $instance->getBindings();
  25230. }
  25231. /**
  25232. * Get the raw array of bindings.
  25233. *
  25234. * @return \Illuminate\Database\Query\array{ select: list<mixed>,
  25235. * from: list<mixed>,
  25236. * join: list<mixed>,
  25237. * where: list<mixed>,
  25238. * groupBy: list<mixed>,
  25239. * having: list<mixed>,
  25240. * order: list<mixed>,
  25241. * union: list<mixed>,
  25242. * unionOrder: list<mixed>,
  25243. * }
  25244. * @static
  25245. */
  25246. public static function getRawBindings()
  25247. {
  25248. /** @var \Illuminate\Database\Query\Builder $instance */
  25249. return $instance->getRawBindings();
  25250. }
  25251. /**
  25252. * Set the bindings on the query builder.
  25253. *
  25254. * @param list<mixed> $bindings
  25255. * @param "select"|"from"|"join"|"where"|"groupBy"|"having"|"order"|"union"|"unionOrder" $type
  25256. * @return \Illuminate\Database\Eloquent\Builder<static>
  25257. * @throws \InvalidArgumentException
  25258. * @static
  25259. */
  25260. public static function setBindings($bindings, $type = 'where')
  25261. {
  25262. /** @var \Illuminate\Database\Query\Builder $instance */
  25263. return $instance->setBindings($bindings, $type);
  25264. }
  25265. /**
  25266. * Add a binding to the query.
  25267. *
  25268. * @param mixed $value
  25269. * @param "select"|"from"|"join"|"where"|"groupBy"|"having"|"order"|"union"|"unionOrder" $type
  25270. * @return \Illuminate\Database\Eloquent\Builder<static>
  25271. * @throws \InvalidArgumentException
  25272. * @static
  25273. */
  25274. public static function addBinding($value, $type = 'where')
  25275. {
  25276. /** @var \Illuminate\Database\Query\Builder $instance */
  25277. return $instance->addBinding($value, $type);
  25278. }
  25279. /**
  25280. * Cast the given binding value.
  25281. *
  25282. * @param mixed $value
  25283. * @return mixed
  25284. * @static
  25285. */
  25286. public static function castBinding($value)
  25287. {
  25288. /** @var \Illuminate\Database\Query\Builder $instance */
  25289. return $instance->castBinding($value);
  25290. }
  25291. /**
  25292. * Merge an array of bindings into our bindings.
  25293. *
  25294. * @param self $query
  25295. * @return \Illuminate\Database\Eloquent\Builder<static>
  25296. * @static
  25297. */
  25298. public static function mergeBindings($query)
  25299. {
  25300. /** @var \Illuminate\Database\Query\Builder $instance */
  25301. return $instance->mergeBindings($query);
  25302. }
  25303. /**
  25304. * Remove all of the expressions from a list of bindings.
  25305. *
  25306. * @param array<mixed> $bindings
  25307. * @return list<mixed>
  25308. * @static
  25309. */
  25310. public static function cleanBindings($bindings)
  25311. {
  25312. /** @var \Illuminate\Database\Query\Builder $instance */
  25313. return $instance->cleanBindings($bindings);
  25314. }
  25315. /**
  25316. * Get the database query processor instance.
  25317. *
  25318. * @return \Illuminate\Database\Query\Processors\Processor
  25319. * @static
  25320. */
  25321. public static function getProcessor()
  25322. {
  25323. /** @var \Illuminate\Database\Query\Builder $instance */
  25324. return $instance->getProcessor();
  25325. }
  25326. /**
  25327. * Get the query grammar instance.
  25328. *
  25329. * @return \Illuminate\Database\Query\Grammars\Grammar
  25330. * @static
  25331. */
  25332. public static function getGrammar()
  25333. {
  25334. /** @var \Illuminate\Database\Query\Builder $instance */
  25335. return $instance->getGrammar();
  25336. }
  25337. /**
  25338. * Use the "write" PDO connection when executing the query.
  25339. *
  25340. * @return \Illuminate\Database\Eloquent\Builder<static>
  25341. * @static
  25342. */
  25343. public static function useWritePdo()
  25344. {
  25345. /** @var \Illuminate\Database\Query\Builder $instance */
  25346. return $instance->useWritePdo();
  25347. }
  25348. /**
  25349. * Clone the query without the given properties.
  25350. *
  25351. * @return static
  25352. * @static
  25353. */
  25354. public static function cloneWithout($properties)
  25355. {
  25356. /** @var \Illuminate\Database\Query\Builder $instance */
  25357. return $instance->cloneWithout($properties);
  25358. }
  25359. /**
  25360. * Clone the query without the given bindings.
  25361. *
  25362. * @return static
  25363. * @static
  25364. */
  25365. public static function cloneWithoutBindings($except)
  25366. {
  25367. /** @var \Illuminate\Database\Query\Builder $instance */
  25368. return $instance->cloneWithoutBindings($except);
  25369. }
  25370. /**
  25371. * Dump the current SQL and bindings.
  25372. *
  25373. * @param mixed $args
  25374. * @return \Illuminate\Database\Eloquent\Builder<static>
  25375. * @static
  25376. */
  25377. public static function dump(...$args)
  25378. {
  25379. /** @var \Illuminate\Database\Query\Builder $instance */
  25380. return $instance->dump(...$args);
  25381. }
  25382. /**
  25383. * Dump the raw current SQL with embedded bindings.
  25384. *
  25385. * @return \Illuminate\Database\Eloquent\Builder<static>
  25386. * @static
  25387. */
  25388. public static function dumpRawSql()
  25389. {
  25390. /** @var \Illuminate\Database\Query\Builder $instance */
  25391. return $instance->dumpRawSql();
  25392. }
  25393. /**
  25394. * Die and dump the current SQL and bindings.
  25395. *
  25396. * @return never
  25397. * @static
  25398. */
  25399. public static function dd()
  25400. {
  25401. /** @var \Illuminate\Database\Query\Builder $instance */
  25402. return $instance->dd();
  25403. }
  25404. /**
  25405. * Die and dump the current SQL with embedded bindings.
  25406. *
  25407. * @return never
  25408. * @static
  25409. */
  25410. public static function ddRawSql()
  25411. {
  25412. /** @var \Illuminate\Database\Query\Builder $instance */
  25413. return $instance->ddRawSql();
  25414. }
  25415. /**
  25416. * Add a where clause to determine if a "date" column is in the past to the query.
  25417. *
  25418. * @param array|string $columns
  25419. * @return \Illuminate\Database\Eloquent\Builder<static>
  25420. * @static
  25421. */
  25422. public static function wherePast($columns)
  25423. {
  25424. /** @var \Illuminate\Database\Query\Builder $instance */
  25425. return $instance->wherePast($columns);
  25426. }
  25427. /**
  25428. * Add a where clause to determine if a "date" column is in the past or now to the query.
  25429. *
  25430. * @param array|string $columns
  25431. * @return \Illuminate\Database\Eloquent\Builder<static>
  25432. * @static
  25433. */
  25434. public static function whereNowOrPast($columns)
  25435. {
  25436. /** @var \Illuminate\Database\Query\Builder $instance */
  25437. return $instance->whereNowOrPast($columns);
  25438. }
  25439. /**
  25440. * Add an "or where" clause to determine if a "date" column is in the past to the query.
  25441. *
  25442. * @param array|string $columns
  25443. * @return \Illuminate\Database\Eloquent\Builder<static>
  25444. * @static
  25445. */
  25446. public static function orWherePast($columns)
  25447. {
  25448. /** @var \Illuminate\Database\Query\Builder $instance */
  25449. return $instance->orWherePast($columns);
  25450. }
  25451. /**
  25452. * Add a where clause to determine if a "date" column is in the past or now to the query.
  25453. *
  25454. * @param array|string $columns
  25455. * @return \Illuminate\Database\Eloquent\Builder<static>
  25456. * @static
  25457. */
  25458. public static function orWhereNowOrPast($columns)
  25459. {
  25460. /** @var \Illuminate\Database\Query\Builder $instance */
  25461. return $instance->orWhereNowOrPast($columns);
  25462. }
  25463. /**
  25464. * Add a where clause to determine if a "date" column is in the future to the query.
  25465. *
  25466. * @param array|string $columns
  25467. * @return \Illuminate\Database\Eloquent\Builder<static>
  25468. * @static
  25469. */
  25470. public static function whereFuture($columns)
  25471. {
  25472. /** @var \Illuminate\Database\Query\Builder $instance */
  25473. return $instance->whereFuture($columns);
  25474. }
  25475. /**
  25476. * Add a where clause to determine if a "date" column is in the future or now to the query.
  25477. *
  25478. * @param array|string $columns
  25479. * @return \Illuminate\Database\Eloquent\Builder<static>
  25480. * @static
  25481. */
  25482. public static function whereNowOrFuture($columns)
  25483. {
  25484. /** @var \Illuminate\Database\Query\Builder $instance */
  25485. return $instance->whereNowOrFuture($columns);
  25486. }
  25487. /**
  25488. * Add an "or where" clause to determine if a "date" column is in the future to the query.
  25489. *
  25490. * @param array|string $columns
  25491. * @return \Illuminate\Database\Eloquent\Builder<static>
  25492. * @static
  25493. */
  25494. public static function orWhereFuture($columns)
  25495. {
  25496. /** @var \Illuminate\Database\Query\Builder $instance */
  25497. return $instance->orWhereFuture($columns);
  25498. }
  25499. /**
  25500. * Add an "or where" clause to determine if a "date" column is in the future or now to the query.
  25501. *
  25502. * @param array|string $columns
  25503. * @return \Illuminate\Database\Eloquent\Builder<static>
  25504. * @static
  25505. */
  25506. public static function orWhereNowOrFuture($columns)
  25507. {
  25508. /** @var \Illuminate\Database\Query\Builder $instance */
  25509. return $instance->orWhereNowOrFuture($columns);
  25510. }
  25511. /**
  25512. * Add a "where date" clause to determine if a "date" column is today to the query.
  25513. *
  25514. * @param array|string $columns
  25515. * @param string $boolean
  25516. * @return \Illuminate\Database\Eloquent\Builder<static>
  25517. * @static
  25518. */
  25519. public static function whereToday($columns, $boolean = 'and')
  25520. {
  25521. /** @var \Illuminate\Database\Query\Builder $instance */
  25522. return $instance->whereToday($columns, $boolean);
  25523. }
  25524. /**
  25525. * Add a "where date" clause to determine if a "date" column is before today.
  25526. *
  25527. * @param array|string $columns
  25528. * @return \Illuminate\Database\Eloquent\Builder<static>
  25529. * @static
  25530. */
  25531. public static function whereBeforeToday($columns)
  25532. {
  25533. /** @var \Illuminate\Database\Query\Builder $instance */
  25534. return $instance->whereBeforeToday($columns);
  25535. }
  25536. /**
  25537. * Add a "where date" clause to determine if a "date" column is today or before to the query.
  25538. *
  25539. * @param array|string $columns
  25540. * @return \Illuminate\Database\Eloquent\Builder<static>
  25541. * @static
  25542. */
  25543. public static function whereTodayOrBefore($columns)
  25544. {
  25545. /** @var \Illuminate\Database\Query\Builder $instance */
  25546. return $instance->whereTodayOrBefore($columns);
  25547. }
  25548. /**
  25549. * Add a "where date" clause to determine if a "date" column is after today.
  25550. *
  25551. * @param array|string $columns
  25552. * @return \Illuminate\Database\Eloquent\Builder<static>
  25553. * @static
  25554. */
  25555. public static function whereAfterToday($columns)
  25556. {
  25557. /** @var \Illuminate\Database\Query\Builder $instance */
  25558. return $instance->whereAfterToday($columns);
  25559. }
  25560. /**
  25561. * Add a "where date" clause to determine if a "date" column is today or after to the query.
  25562. *
  25563. * @param array|string $columns
  25564. * @return \Illuminate\Database\Eloquent\Builder<static>
  25565. * @static
  25566. */
  25567. public static function whereTodayOrAfter($columns)
  25568. {
  25569. /** @var \Illuminate\Database\Query\Builder $instance */
  25570. return $instance->whereTodayOrAfter($columns);
  25571. }
  25572. /**
  25573. * Add an "or where date" clause to determine if a "date" column is today to the query.
  25574. *
  25575. * @param array|string $columns
  25576. * @return \Illuminate\Database\Eloquent\Builder<static>
  25577. * @static
  25578. */
  25579. public static function orWhereToday($columns)
  25580. {
  25581. /** @var \Illuminate\Database\Query\Builder $instance */
  25582. return $instance->orWhereToday($columns);
  25583. }
  25584. /**
  25585. * Add an "or where date" clause to determine if a "date" column is before today.
  25586. *
  25587. * @param array|string $columns
  25588. * @return \Illuminate\Database\Eloquent\Builder<static>
  25589. * @static
  25590. */
  25591. public static function orWhereBeforeToday($columns)
  25592. {
  25593. /** @var \Illuminate\Database\Query\Builder $instance */
  25594. return $instance->orWhereBeforeToday($columns);
  25595. }
  25596. /**
  25597. * Add an "or where date" clause to determine if a "date" column is today or before to the query.
  25598. *
  25599. * @param array|string $columns
  25600. * @return \Illuminate\Database\Eloquent\Builder<static>
  25601. * @static
  25602. */
  25603. public static function orWhereTodayOrBefore($columns)
  25604. {
  25605. /** @var \Illuminate\Database\Query\Builder $instance */
  25606. return $instance->orWhereTodayOrBefore($columns);
  25607. }
  25608. /**
  25609. * Add an "or where date" clause to determine if a "date" column is after today.
  25610. *
  25611. * @param array|string $columns
  25612. * @return \Illuminate\Database\Eloquent\Builder<static>
  25613. * @static
  25614. */
  25615. public static function orWhereAfterToday($columns)
  25616. {
  25617. /** @var \Illuminate\Database\Query\Builder $instance */
  25618. return $instance->orWhereAfterToday($columns);
  25619. }
  25620. /**
  25621. * Add an "or where date" clause to determine if a "date" column is today or after to the query.
  25622. *
  25623. * @param array|string $columns
  25624. * @return \Illuminate\Database\Eloquent\Builder<static>
  25625. * @static
  25626. */
  25627. public static function orWhereTodayOrAfter($columns)
  25628. {
  25629. /** @var \Illuminate\Database\Query\Builder $instance */
  25630. return $instance->orWhereTodayOrAfter($columns);
  25631. }
  25632. /**
  25633. * Explains the query.
  25634. *
  25635. * @return \Illuminate\Support\Collection
  25636. * @static
  25637. */
  25638. public static function explain()
  25639. {
  25640. /** @var \Illuminate\Database\Query\Builder $instance */
  25641. return $instance->explain();
  25642. }
  25643. /**
  25644. * Register a custom macro.
  25645. *
  25646. * @param string $name
  25647. * @param object|callable $macro
  25648. * @param-closure-this static $macro
  25649. * @return void
  25650. * @static
  25651. */
  25652. public static function macro($name, $macro)
  25653. {
  25654. \Illuminate\Database\Query\Builder::macro($name, $macro);
  25655. }
  25656. /**
  25657. * Mix another object into the class.
  25658. *
  25659. * @param object $mixin
  25660. * @param bool $replace
  25661. * @return void
  25662. * @throws \ReflectionException
  25663. * @static
  25664. */
  25665. public static function mixin($mixin, $replace = true)
  25666. {
  25667. \Illuminate\Database\Query\Builder::mixin($mixin, $replace);
  25668. }
  25669. /**
  25670. * Flush the existing macros.
  25671. *
  25672. * @return void
  25673. * @static
  25674. */
  25675. public static function flushMacros()
  25676. {
  25677. \Illuminate\Database\Query\Builder::flushMacros();
  25678. }
  25679. /**
  25680. * Dynamically handle calls to the class.
  25681. *
  25682. * @param string $method
  25683. * @param array $parameters
  25684. * @return mixed
  25685. * @throws \BadMethodCallException
  25686. * @static
  25687. */
  25688. public static function macroCall($method, $parameters)
  25689. {
  25690. /** @var \Illuminate\Database\Query\Builder $instance */
  25691. return $instance->macroCall($method, $parameters);
  25692. }
  25693. }
  25694. class Event extends \Illuminate\Support\Facades\Event {}
  25695. class File extends \Illuminate\Support\Facades\File {}
  25696. class Gate extends \Illuminate\Support\Facades\Gate {}
  25697. class Hash extends \Illuminate\Support\Facades\Hash {}
  25698. class Http extends \Illuminate\Support\Facades\Http {}
  25699. class Js extends \Illuminate\Support\Js {}
  25700. class Lang extends \Illuminate\Support\Facades\Lang {}
  25701. class Log extends \Illuminate\Support\Facades\Log {}
  25702. class Mail extends \Illuminate\Support\Facades\Mail {}
  25703. class Notification extends \Illuminate\Support\Facades\Notification {}
  25704. class Number extends \Illuminate\Support\Number {}
  25705. class Password extends \Illuminate\Support\Facades\Password {}
  25706. class Process extends \Illuminate\Support\Facades\Process {}
  25707. class Queue extends \Illuminate\Support\Facades\Queue {}
  25708. class RateLimiter extends \Illuminate\Support\Facades\RateLimiter {}
  25709. class Redirect extends \Illuminate\Support\Facades\Redirect {}
  25710. class Request extends \Illuminate\Support\Facades\Request {}
  25711. class Response extends \Illuminate\Support\Facades\Response {}
  25712. class Route extends \Illuminate\Support\Facades\Route {}
  25713. class Schedule extends \Illuminate\Support\Facades\Schedule {}
  25714. class Schema extends \Illuminate\Support\Facades\Schema {}
  25715. class Session extends \Illuminate\Support\Facades\Session {}
  25716. class Storage extends \Illuminate\Support\Facades\Storage {}
  25717. class Str extends \Illuminate\Support\Str {}
  25718. class URL extends \Illuminate\Support\Facades\URL {}
  25719. class Uri extends \Illuminate\Support\Uri {}
  25720. class Validator extends \Illuminate\Support\Facades\Validator {}
  25721. class View extends \Illuminate\Support\Facades\View {}
  25722. class Vite extends \Illuminate\Support\Facades\Vite {}
  25723. class Firebase extends \Kreait\Laravel\Firebase\Facades\Firebase {}
  25724. }