how can i create a folder using a controller function?
(Routes and all are good, but don't know how to make the folder)
I have a simple form for example:
<form method="POST" action="{{ route('admin.projects.store') }}" enctype="multipart/form-data">
<div class="form-group">
<label name="title">Slug:</label>
<input type="text" id="slug" name="slug" placeholder="ejemplo-de-slug" class="form-control form-control-sm">
</div>
</form>
Route in web.php:
Route::post('projects/postUpload', ['uses' => 'AdminController@storeProject', 'as' => 'admin.projects.store']);
I want to put to the folder the same name of the slug.
public function storeProject()
{
return ;
}
Know how to do it?