REFACTORING #1880 @40m: move creating new directory into interaction
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace App\CMS\Repositories\FileManager;
|
||||
|
||||
use App\Models\FileManager\Directory as DirectoryModel;
|
||||
|
||||
class Directory
|
||||
{
|
||||
public function checkIfNameExists($name, $directoryId)
|
||||
{
|
||||
return DirectoryModel::where('name', $name)
|
||||
->where('parent_id', $directoryId)
|
||||
->exists();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user