also looking at this
Initial Progress
#2
11 files
+235
-34
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -0,0 +1,59 @@ | ||
| 1 | <?php | |
| 2 | ||
| 3 | namespace Meema\LaravelMeema\Contracts; | |
| 4 | ||
| 5 | interface FavoriteInterface | |
| 6 | { | |
| 7 | /** | |
| 8 | * List all favorites. | |
| 9 | * | |
| 10 | * @return array | |
| 11 | */ | |
| 12 | public function all(): array; | |
| 13 | ||
| 14 | /** | |
| 15 | * Get specific favorites. | |
| 16 | * | |
| 17 | * @param array $ids | |
| 18 | * | |
| 19 | * @return array | |
| 20 | */ | |
| 21 | public function get($ids = null): array; | |
| 22 | ||
| 23 | /** | |
| 24 | * Get specific favorites. | |
| 25 | * | |
| 26 | * @param int $id | |
| 27 | * | |
| 28 | * @return array | |
| 29 | */ | |
| 30 | public function find($id): array; | |
| 31 | ||
| 32 | /** | |
| 33 | * Create favorite. | |
| 34 | * | |
| 35 | * @param array $data | |
| 36 | * | |
| 37 | * @return array | |
| 38 | */ | |
| 39 | public function create($data): array; | |
| 40 | ||
| 41 | /** | |
| 42 | * Update favorite. | |
| 43 | * | |
| 44 | * @param int $id | |
| 45 | * @param string $data | |
| 46 | * | |
| 47 | * @return array | |
| 48 | */ | |
| 49 | public function update($id, $data): array; | |
| 50 | ||
| 51 | /** | |
| 52 | * Delete a favorite. | |
| 53 | * | |
| 54 | * @param array $ids | |
| 55 | * | |
| 56 | * @return null | |
| 57 | */ | |
| 58 | public function delete($ids); | |
| 59 | } | |
| @@ -0,0 +1,95 @@ | ||
| 1 | <?php | |
| 2 | ||
| 3 | namespace Meema\LaravelMeema\Contracts; | |
| 4 | ||
| 5 | interface FolderInterface | |
| 6 | { | |
| 7 | /** | |
| 8 | * List all folders. | |
| 9 | * | |
| 10 | * @return array | |
| 11 | */ | |
| 12 | public function all(): array; | |
| 13 | ||
| 14 | /** | |
| 15 | * Get specific folders. | |
| 16 | * | |
| 17 | * @param int $id | |
| 18 | * | |
| 19 | * @return array | |
| 20 | */ | |
| 21 | public function get($id = null): array; | |
| 22 | ||
| 23 | /** | |
| 24 | * Search for specific folders. | |
| 25 | * | |
| 26 | * @param string $query | |
| 27 | * | |
| 28 | * @return array | |
| 29 | */ | |
| 30 | public function search($query): array; | |
| 31 | ||
| 32 | /** | |
| 33 | * Get specific folders. | |
| 34 | * | |
| 35 | * @param int $id | |
| 36 | * | |
| 37 | * @return Response | |
| 38 | */ | |
| 39 | public function find($id): array; | |
| 40 | ||
| 41 | /** | |
| 42 | * Create folder. | |
| 43 | * | |
| 44 | * @param string $name | |
| 45 | * | |
| 46 | * @return array | |
| 47 | */ | |
| 48 | public function create($name): array; | |
| 49 | ||
| 50 | /** | |
| 51 | * Update folder. | |
| 52 | * | |
| 53 | * @param int $id | |
| 54 | * @param string $name | |
| 55 | * | |
| 56 | * @return array | |
| 57 | */ | |
| 58 | public function update($id, $name): array; | |
| 59 | ||
| 60 | /** | |
| 61 | * Delete a folder. | |
| 62 | * | |
| 63 | * @param array $ids | |
| 64 | * | |
| 65 | * @return null | |
| 66 | */ | |
| 67 | public function delete($ids); | |
| 68 | ||
| 69 | /** | |
| 70 | * Archive a folder. | |
| 71 | * | |
| 72 | * @param array $ids | |
| 73 | * | |
| 74 | * @return array | |
| 75 | */ | |
| 76 | public function archive($ids): array; | |
| 77 | ||
| 78 | /** | |
| 79 | * Unarchive a folder. | |
| 80 | * | |
| 81 | * @param array $ids | |
| 82 | * | |
| 83 | * @return array | |
| 84 | */ | |
| 85 | public function unarchive($ids): array; | |
| 86 | ||
| 87 | /** | |
| 88 | * Duplicate a folder. | |
| 89 | * | |
| 90 | * @param array $ids | |
| 91 | * | |
| 92 | * @return array | |
| 93 | */ | |
| 94 | public function duplicate($ids): array; | |
| 95 | } | |
| @@ -0,0 +1,122 @@ | ||
| 1 | <?php | |
| 2 | ||
| 3 | namespace Meema\LaravelMeema\Contracts; | |
| 4 | ||
| 5 | interface MediaInterface | |
| 6 | { | |
| 7 | /** | |
| 8 | * List all media. | |
| 9 | * | |
| 10 | * @return array | |
| 11 | */ | |
| 12 | public function all(): array; | |
| 13 | ||
| 14 | /** | |
| 15 | * Get specific media. | |
| 16 | * | |
| 17 | * @param array $ids | |
| 18 | * | |
| 19 | * @return array | |
| 20 | */ | |
| 21 | public function get($ids = null): array; | |
| 22 | ||
| 23 | /** | |
| 24 | * Search for specific media. | |
| 25 | * | |
| 26 | * @param string $query | |
| 27 | * | |
| 28 | * @return array | |
| 29 | */ | |
| 30 | public function search($query): array; | |
| 31 | ||
| 32 | /** | |
| 33 | * Get specific media. | |
| 34 | * | |
| 35 | * @param int $id | |
| 36 | * | |
| 37 | * @return array | |
| 38 | */ | |
| 39 | public function find($id): array; | |
| 40 | ||
| 41 | /** | |
| 42 | * Create media. | |
| 43 | * | |
| 44 | * @param string $name | |
| 45 | * | |
| 46 | * @return array | |
| 47 | */ | |
| 48 | public function create($name): array; | |
| 49 | ||
| 50 | /** | |
| 51 | * Update media. | |
| 52 | * | |
| 53 | * @param int $id | |
| 54 | * @param string $name | |
| 55 | * | |
| 56 | * @return array | |
| 57 | */ | |
| 58 | public function update($id, $name): array; | |
| 59 | ||
| 60 | /** | |
| 61 | * Delete a media. | |
| 62 | * | |
| 63 | * @param array $ids | |
| 64 | * | |
| 65 | * @return null | |
| 66 | */ | |
| 67 | public function delete($ids); | |
| 68 | ||
| 69 | /** | |
| 70 | * Upload a media file. | |
| 71 | * | |
| 72 | * @param string $path | |
| 73 | * | |
| 74 | * @return array | |
| 75 | */ | |
| 76 | public function upload($path): array; | |
| 77 | ||
| 78 | /** | |
| 79 | * Archive a media. | |
| 80 | * | |
| 81 | * @param array $ids | |
| 82 | * | |
| 83 | * @return array | |
| 84 | */ | |
| 85 | public function archive($ids): array; | |
| 86 | ||
| 87 | /** | |
| 88 | * Unarchive a media. | |
| 89 | * | |
| 90 | * @param array $ids | |
| 91 | * | |
| 92 | * @return array | |
| 93 | */ | |
| 94 | public function unarchive($ids): array; | |
| 95 | ||
| 96 | /** | |
| 97 | * Make a media private. | |
| 98 | * | |
| 99 | * @param array $ids | |
| 100 | * | |
| 101 | * @return array | |
| 102 | */ | |
| 103 | public function makePrivate($ids): array; | |
| 104 | ||
| 105 | /** | |
| 106 | * Make a media public. | |
| 107 | * | |
| 108 | * @param array $ids | |
| 109 | * | |
| 110 | * @return array | |
| 111 | */ | |
| 112 | public function makePublic($ids): array; | |
| 113 | ||
| 114 | /** | |
| 115 | * Duplicate a media. | |
| 116 | * | |
| 117 | * @param array $ids | |
| 118 | * | |
| 119 | * @return array | |
| 120 | */ | |
| 121 | public function duplicate($ids): array; | |
| 122 | } | |
| @@ -0,0 +1,50 @@ | ||
| 1 | <?php | |
| 2 | ||
| 3 | namespace Meema\LaravelMeema\Contracts; | |
| 4 | ||
| 5 | interface TagInterface | |
| 6 | { | |
| 7 | /** | |
| 8 | * List all tags. | |
| 9 | * | |
| 10 | * @return array | |
| 11 | */ | |
| 12 | public function all(): array; | |
| 13 | ||
| 14 | /** | |
| 15 | * Get specific tags. | |
| 16 | * | |
| 17 | * @param array $ids | |
| 18 | * | |
| 19 | * @return array | |
| 20 | */ | |
| 21 | public function get($ids = null): array; | |
| 22 | ||
| 23 | /** | |
| 24 | * Get specific tags. | |
| 25 | * | |
| 26 | * @param int $id | |
| 27 | * | |
| 28 | * @return array | |
| 29 | */ | |
| 30 | public function find($id): array; | |
| 31 | ||
| 32 | /** | |
| 33 | * Update a tag color. | |
| 34 | * | |
| 35 | * @param int $id | |
| 36 | * @param string $color | |
| 37 | * | |
| 38 | * @return array | |
| 39 | */ | |
| 40 | public function update($id, $color): array; | |
| 41 | ||
| 42 | /** | |
| 43 | * Delete tags. | |
| 44 | * | |
| 45 | * @param array $ids | |
| 46 | * | |
| 47 | * @return null | |
| 48 | */ | |
| 49 | public function delete($ids); | |
| 50 | } | |
| @@ -0,0 +1,19 @@ | ||
| 1 | <?php | |
| 2 | ||
| 3 | namespace Meema\LaravelMeema\Facades; | |
| 4 | ||
| 5 | use Illuminate\Support\Facades\Facade; | |
| 6 | use Meema\LaravelMeema\Contracts\FavoriteInterface; | |
| 7 | ||
| 8 | class MeemaFavorite extends Facade | |
| 9 | { | |
| 10 | /** | |
| 11 | * Get the registered name of the component. | |
| 12 | * | |
| 13 | * @return string | |
| 14 | */ | |
| 15 | protected static function getFacadeAccessor() | |
| 16 | { | |
| 17 | return FavoriteInterface::class; | |
| 18 | } | |
| 19 | } | |
| @@ -0,0 +1,19 @@ | ||
| 1 | <?php | |
| 2 | ||
| 3 | namespace Meema\LaravelMeema\Facades; | |
| 4 | ||
| 5 | use Illuminate\Support\Facades\Facade; | |
| 6 | use Meema\LaravelMeema\Contracts\FolderInterface; | |
| 7 | ||
| 8 | class MeemaFolder extends Facade | |
| 9 | { | |
| 10 | /** | |
| 11 | * Get the registered name of the component. | |
| 12 | * | |
| 13 | * @return string | |
| 14 | */ | |
| 15 | protected static function getFacadeAccessor() | |
| 16 | { | |
| 17 | return FolderInterface::class; | |
| 18 | } | |
| 19 | } | |
| @@ -0,0 +1,19 @@ | ||
| 1 | <?php | |
| 2 | ||
| 3 | namespace Meema\LaravelMeema\Facades; | |
| 4 | ||
| 5 | use Illuminate\Support\Facades\Facade; | |
| 6 | use Meema\LaravelMeema\Contracts\MediaInterface; | |
| 7 | ||
| 8 | class MeemaMedia extends Facade | |
| 9 | { | |
| 10 | /** | |
| 11 | * Get the registered name of the component. | |
| 12 | * | |
| 13 | * @return string | |
| 14 | */ | |
| 15 | protected static function getFacadeAccessor() | |
| 16 | { | |
| 17 | return MediaInterface::class; | |
| 18 | } | |
| 19 | } | |
| @@ -0,0 +1,19 @@ | ||
| 1 | <?php | |
| 2 | ||
| 3 | namespace Meema\LaravelMeema\Facades; | |
| 4 | ||
| 5 | use Illuminate\Support\Facades\Facade; | |
| 6 | use Meema\LaravelMeema\Contracts\TagInterface; | |
| 7 | ||
| 8 | class MeemaTag extends Facade | |
| 9 | { | |
| 10 | /** | |
| 11 | * Get the registered name of the component. | |
| 12 | * | |
| 13 | * @return string | |
| 14 | */ | |
| 15 | protected static function getFacadeAccessor() | |
| 16 | { | |
| 17 | return TagInterface::class; | |
| 18 | } | |
| 19 | } | |