[{"data":1,"prerenderedAt":642},["ShallowReactive",2],{"navigation_docs":3,"-essentials-media-library":93,"-essentials-media-library-surround":637},[4,26,77],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":25},"Getting Started","i-lucide-rocket","/getting-started","1.getting-started",[10,15,20],{"title":11,"path":12,"stem":13,"icon":14},"Installation","/getting-started/installation","1.getting-started/1.installation","i-lucide-download",{"title":16,"path":17,"stem":18,"icon":19},"Frontend Setup (headless)","/getting-started/frontend-setup","1.getting-started/2.frontend-setup","i-lucide-layout",{"title":21,"path":22,"stem":23,"icon":24},"Public-routes mode","/getting-started/public-routes-mode","1.getting-started/3.public-routes-mode","i-lucide-zap",false,{"title":27,"icon":28,"path":29,"stem":30,"children":31,"page":25},"Essentials","i-lucide-book-open","/essentials","2.essentials",[32,37,42,47,52,57,62,67,72],{"title":33,"path":34,"stem":35,"icon":36},"Blade Components","/essentials/blade-components","2.essentials/1.blade-components","i-lucide-component",{"title":38,"path":39,"stem":40,"icon":41},"Filament Admin","/essentials/filament-admin","2.essentials/2.filament-admin","i-lucide-layout-dashboard",{"title":43,"path":44,"stem":45,"icon":46},"MCP Tools","/essentials/mcp-tools","2.essentials/3.mcp-tools","i-lucide-bot",{"title":48,"path":49,"stem":50,"icon":51},"Configuration","/essentials/configuration","2.essentials/4.configuration","i-lucide-settings",{"title":53,"path":54,"stem":55,"icon":56},"Tags Taxonomy","/essentials/tags","2.essentials/5.tags","i-lucide-hash",{"title":58,"path":59,"stem":60,"icon":61},"MediaLibrary Integration","/essentials/media-library","2.essentials/6.media-library","i-lucide-image",{"title":63,"path":64,"stem":65,"icon":66},"Search","/essentials/search","2.essentials/7.search","i-lucide-search",{"title":68,"path":69,"stem":70,"icon":71},"Schema","/essentials/schema","2.essentials/8.schema","i-lucide-code-2",{"title":73,"path":74,"stem":75,"icon":76},"Listing SEO","/essentials/listing-seo","2.essentials/9.listing-seo","i-lucide-list",{"title":78,"icon":79,"path":80,"stem":81,"children":82,"page":25},"Community","i-lucide-users","/community","4.community",[83,88],{"title":84,"path":85,"stem":86,"icon":87},"Contributing","/community/contributing","4.community/1.contributing","i-lucide-git-pull-request",{"title":89,"path":90,"stem":91,"icon":92},"License","/community/license","4.community/2.license","i-lucide-scale",{"id":94,"title":58,"body":95,"description":630,"extension":631,"links":632,"meta":633,"navigation":634,"path":59,"seo":635,"stem":60,"__hash__":636},"docs/2.essentials/6.media-library.md",{"type":96,"value":97,"toc":624},"minimark",[98,126,141,146,281,285,303,310,551,554,570,583,590,596,617,620],[99,100,101,102,106,107,117,118,121,122,125],"p",{},"The package ships an ",[103,104,105],"strong",{},"opt-in"," integration with ",[108,109,113],"a",{"href":110,"rel":111},"https://spatie.be/docs/laravel-medialibrary",[112],"nofollow",[114,115,116],"code",{},"spatie/laravel-medialibrary",". When enabled, the featured-image upload uses ",[114,119,120],{},"SpatieMediaLibraryFileUpload"," instead of the default ",[114,123,124],{},"FileUpload",".",[127,128,130,133,134,136,137,140],"alert",{"type":129},"info",[103,131,132],{},"MediaLibrary is not a hard dependency."," If you don't install it, the form gracefully falls back to the plain ",[114,135,124],{}," — no crash. Flipping ",[114,138,139],{},"features.media_library"," without installing MediaLibrary is a no-op.",[142,143,145],"h2",{"id":144},"enable","Enable",[147,148,149,224,270],"ol",{},[150,151,152,153],"li",{},"Install the package:",[154,155,161],"pre",{"className":156,"code":157,"filename":158,"language":159,"meta":160,"style":160},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","composer require spatie/laravel-medialibrary\nphp artisan vendor:publish --provider=\"Spatie\\MediaLibrary\\MediaLibraryServiceProvider\" --tag=\"medialibrary-migrations\"\nphp artisan migrate\n","Terminal","bash","",[114,162,163,179,214],{"__ignoreMap":160},[164,165,168,172,176],"span",{"class":166,"line":167},"line",1,[164,169,171],{"class":170},"sBMFI","composer",[164,173,175],{"class":174},"sfazB"," require",[164,177,178],{"class":174}," spatie/laravel-medialibrary\n",[164,180,182,185,188,191,194,198,201,203,206,208,211],{"class":166,"line":181},2,[164,183,184],{"class":170},"php",[164,186,187],{"class":174}," artisan",[164,189,190],{"class":174}," vendor:publish",[164,192,193],{"class":174}," --provider=",[164,195,197],{"class":196},"sMK4o","\"",[164,199,200],{"class":174},"Spatie\\MediaLibrary\\MediaLibraryServiceProvider",[164,202,197],{"class":196},[164,204,205],{"class":174}," --tag=",[164,207,197],{"class":196},[164,209,210],{"class":174},"medialibrary-migrations",[164,212,213],{"class":196},"\"\n",[164,215,217,219,221],{"class":166,"line":216},3,[164,218,184],{"class":170},[164,220,187],{"class":174},[164,222,223],{"class":174}," migrate\n",[150,225,226,227],{},"Flip the flag:",[154,228,232],{"className":229,"code":230,"filename":231,"language":184,"meta":160,"style":160},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","'features' => [\n    'media_library' => true,\n],\n","config/ink.php",[114,233,234,250,265],{"__ignoreMap":160},[164,235,236,239,242,244,247],{"class":166,"line":167},[164,237,238],{"class":196},"'",[164,240,241],{"class":174},"features",[164,243,238],{"class":196},[164,245,246],{"class":196}," =>",[164,248,249],{"class":196}," [\n",[164,251,252,255,258,260,262],{"class":166,"line":181},[164,253,254],{"class":196},"    '",[164,256,257],{"class":174},"media_library",[164,259,238],{"class":196},[164,261,246],{"class":196},[164,263,264],{"class":196}," true,\n",[164,266,267],{"class":166,"line":216},[164,268,269],{"class":196},"],\n",[150,271,272,273,276,277,280],{},"Use the form as usual — the featured-image field now writes to the MediaLibrary ",[114,274,275],{},"media"," table on a ",[114,278,279],{},"featured_image"," collection.",[142,282,284],{"id":283},"form-side-only-for-now","Form-side only (for now)",[99,286,287,288,291,292,295,296,299,300,302],{},"This integration covers the ",[103,289,290],{},"admin form-component swap only",". The model-side integration (implementing ",[114,293,294],{},"HasMedia",", registering collections via ",[114,297,298],{},"registerMediaCollections()",", migrating existing ",[114,301,279],{}," string column data) is intentionally deferred — that requires careful schema-migration design that doesn't fit a feature-flag layer.",[99,304,305,306,309],{},"If you want the full integration today, override the ",[114,307,308],{},"Post"," model in your app:",[154,311,314],{"className":229,"code":312,"filename":313,"language":184,"meta":160,"style":160},"namespace App\\Models;\n\nuse Relaticle\\Ink\\Models\\Post as BasePost;\nuse Spatie\\MediaLibrary\\HasMedia;\nuse Spatie\\MediaLibrary\\InteractsWithMedia;\nuse Spatie\\MediaLibrary\\MediaCollections\\Models\\Collections\\MediaCollection;\n\nclass BlogPost extends BasePost implements HasMedia\n{\n    use InteractsWithMedia;\n\n    public function registerMediaCollections(): void\n    {\n        $this->addMediaCollection('featured_image')->singleFile();\n    }\n}\n","app/Models/BlogPost.php",[114,315,316,334,340,370,389,407,439,444,465,471,482,487,506,512,539,545],{"__ignoreMap":160},[164,317,318,322,325,328,331],{"class":166,"line":167},[164,319,321],{"class":320},"sbssI","namespace",[164,323,324],{"class":170}," App",[164,326,327],{"class":196},"\\",[164,329,330],{"class":170},"Models",[164,332,333],{"class":196},";\n",[164,335,336],{"class":166,"line":181},[164,337,339],{"emptyLinePlaceholder":338},true,"\n",[164,341,342,345,349,351,354,356,358,360,362,365,368],{"class":166,"line":216},[164,343,344],{"class":320},"use",[164,346,348],{"class":347},"sTEyZ"," Relaticle",[164,350,327],{"class":196},[164,352,353],{"class":347},"Ink",[164,355,327],{"class":196},[164,357,330],{"class":347},[164,359,327],{"class":196},[164,361,308],{"class":347},[164,363,364],{"class":320}," as",[164,366,367],{"class":170}," BasePost",[164,369,333],{"class":196},[164,371,373,375,378,380,383,385,387],{"class":166,"line":372},4,[164,374,344],{"class":320},[164,376,377],{"class":347}," Spatie",[164,379,327],{"class":196},[164,381,382],{"class":347},"MediaLibrary",[164,384,327],{"class":196},[164,386,294],{"class":347},[164,388,333],{"class":196},[164,390,392,394,396,398,400,402,405],{"class":166,"line":391},5,[164,393,344],{"class":320},[164,395,377],{"class":347},[164,397,327],{"class":196},[164,399,382],{"class":347},[164,401,327],{"class":196},[164,403,404],{"class":347},"InteractsWithMedia",[164,406,333],{"class":196},[164,408,410,412,414,416,418,420,423,425,427,429,432,434,437],{"class":166,"line":409},6,[164,411,344],{"class":320},[164,413,377],{"class":347},[164,415,327],{"class":196},[164,417,382],{"class":347},[164,419,327],{"class":196},[164,421,422],{"class":347},"MediaCollections",[164,424,327],{"class":196},[164,426,330],{"class":347},[164,428,327],{"class":196},[164,430,431],{"class":347},"Collections",[164,433,327],{"class":196},[164,435,436],{"class":347},"MediaCollection",[164,438,333],{"class":196},[164,440,442],{"class":166,"line":441},7,[164,443,339],{"emptyLinePlaceholder":338},[164,445,447,451,454,457,459,462],{"class":166,"line":446},8,[164,448,450],{"class":449},"spNyl","class",[164,452,453],{"class":170}," BlogPost",[164,455,456],{"class":449}," extends",[164,458,367],{"class":170},[164,460,461],{"class":449}," implements",[164,463,464],{"class":170}," HasMedia\n",[164,466,468],{"class":166,"line":467},9,[164,469,470],{"class":196},"{\n",[164,472,474,477,480],{"class":166,"line":473},10,[164,475,476],{"class":320},"    use",[164,478,479],{"class":347}," InteractsWithMedia",[164,481,333],{"class":196},[164,483,485],{"class":166,"line":484},11,[164,486,339],{"emptyLinePlaceholder":338},[164,488,490,493,496,500,503],{"class":166,"line":489},12,[164,491,492],{"class":449},"    public",[164,494,495],{"class":449}," function",[164,497,499],{"class":498},"s2Zo4"," registerMediaCollections",[164,501,502],{"class":196},"():",[164,504,505],{"class":320}," void\n",[164,507,509],{"class":166,"line":508},13,[164,510,511],{"class":196},"    {\n",[164,513,515,518,521,524,526,528,530,533,536],{"class":166,"line":514},14,[164,516,517],{"class":196},"        $this->",[164,519,520],{"class":498},"addMediaCollection",[164,522,523],{"class":196},"(",[164,525,238],{"class":196},[164,527,279],{"class":174},[164,529,238],{"class":196},[164,531,532],{"class":196},")->",[164,534,535],{"class":498},"singleFile",[164,537,538],{"class":196},"();\n",[164,540,542],{"class":166,"line":541},15,[164,543,544],{"class":196},"    }\n",[164,546,548],{"class":166,"line":547},16,[164,549,550],{"class":196},"}\n",[99,552,553],{},"Then point the package at your model:",[154,555,557],{"className":229,"code":556,"filename":231,"language":184,"meta":160,"style":160},"// (post_model is not currently a config key — track this in\n// Phase 3 follow-up; for now the package always uses its own Post)\n",[114,558,559,565],{"__ignoreMap":160},[164,560,561],{"class":166,"line":167},[164,562,564],{"class":563},"sHwdD","// (post_model is not currently a config key — track this in\n",[164,566,567],{"class":166,"line":181},[164,568,569],{"class":563},"// Phase 3 follow-up; for now the package always uses its own Post)\n",[127,571,573,574,579,580,125],{"type":572},"warning","Swapping the post model isn't a config option in v1.4 — that lands in Phase 3 along with the model-side integration. Watch the ",[108,575,578],{"href":576,"rel":577},"https://github.com/relaticle/ink/releases",[112],"GitHub releases"," for ",[114,581,582],{},"v1.5",[142,584,586,587,589],{"id":585},"migrating-existing-featured_image-data","Migrating existing ",[114,588,279],{}," data",[99,591,592,593,595],{},"When Phase 3 lands, existing posts with a ",[114,594,279],{}," string path will be migrated to MediaLibrary entries via a console command. Until then, two options:",[147,597,598,606],{},[150,599,600,605],{},[103,601,602,603],{},"Stay on ",[114,604,124],{}," — leave the flag off. No migration required.",[150,607,608,611,612,614,615,280],{},[103,609,610],{},"Manual migration"," — write your own script to copy ",[114,613,279],{}," files into MediaLibrary on a ",[114,616,279],{},[99,618,619],{},"Both Tapix and FilaForms blogs (which this package replaces) use the same string-column approach, so flipping the flag without migration leaves you in a usable state — new posts go to MediaLibrary, old posts keep using the string path. The shipped views render whichever exists.",[621,622,623],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":160,"searchDepth":181,"depth":181,"links":625},[626,627,628],{"id":144,"depth":181,"text":145},{"id":283,"depth":181,"text":284},{"id":585,"depth":181,"text":629},"Migrating existing featured_image data","Opt-in featured-image upload via spatie/laravel-medialibrary.","md",null,{},{"icon":61},{"title":58,"description":630},"NgM2A-sdFAcb3-FNS9uxcWXE6SIUTJVJlHfHaU5ZzBQ",[638,640],{"title":53,"path":54,"stem":55,"description":639,"icon":56,"children":-1},"Opt-in many-to-many tags taxonomy with admin UI and public archive.",{"title":63,"path":64,"stem":65,"description":641,"icon":66,"children":-1},"Portable search across blog posts with a config-driven backend hook.",1778707660481]