mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Started base work on attribute system
This commit is contained in:
32
app/Http/Controllers/AttributeController.php
Normal file
32
app/Http/Controllers/AttributeController.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php namespace BookStack\Http\Controllers;
|
||||
|
||||
use BookStack\Repos\AttributeRepo;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use BookStack\Http\Requests;
|
||||
|
||||
class AttributeController extends Controller
|
||||
{
|
||||
|
||||
protected $attributeRepo;
|
||||
|
||||
/**
|
||||
* AttributeController constructor.
|
||||
* @param $attributeRepo
|
||||
*/
|
||||
public function __construct(AttributeRepo $attributeRepo)
|
||||
{
|
||||
$this->attributeRepo = $attributeRepo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all the Attributes for a particular entity
|
||||
* @param $entityType
|
||||
* @param $entityId
|
||||
*/
|
||||
public function getForEntity($entityType, $entityId)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -80,11 +80,16 @@ Route::group(['middleware' => 'auth'], function () {
|
||||
Route::delete('/{imageId}', 'ImageController@destroy');
|
||||
});
|
||||
|
||||
// Ajax routes
|
||||
// AJAX routes
|
||||
Route::put('/ajax/page/{id}/save-draft', 'PageController@saveDraft');
|
||||
Route::get('/ajax/page/{id}', 'PageController@getPageAjax');
|
||||
Route::delete('/ajax/page/{id}', 'PageController@ajaxDestroy');
|
||||
|
||||
// Attribute routes (AJAX)
|
||||
Route::group(['prefix' => 'ajax/attributes'], function() {
|
||||
Route::get('/get/{entityType}/{entityId}', 'AttributeController@getForEntity');
|
||||
});
|
||||
|
||||
// Links
|
||||
Route::get('/link/{id}', 'PageController@redirectFromLink');
|
||||
|
||||
|
Reference in New Issue
Block a user