@msslgomez Where is the page content coming actually from? If it’s just coming from a form, then you’d just save the string contents to a file with the path of your choosing:
$path = sprintf('%s.md', Str::uuid());
$contents = $request->input('page_content');
Storage::disk('public')->put($path, $contents);
You’d then store the path in your database, so you can retrieve it and get the file contents back:
$contents = Storage::disk('public')->get($page->path);
However, if you’re storing the path in a database, that means you have a database available, so why even bother saving content to Markdown files on disk in the first place? Why not just store the content in the database alongside the rest of the page data?
$page = Page::query()->create([
'title' => $request->input('title'),
'content' => $request->input('content'),
]);