44 lines
861 B
TypeScript
44 lines
861 B
TypeScript
import type { HttpContext } from '@adonisjs/core/http'
|
|
import Section from '#models/section'
|
|
import { inject } from '@adonisjs/core'
|
|
|
|
export default class SectionsController {
|
|
/**
|
|
* Display a list of resource
|
|
*/
|
|
@inject()
|
|
async index({}: HttpContext) {
|
|
return Section.query().orderBy('asc')
|
|
}
|
|
|
|
/**
|
|
* Display form to create a new record
|
|
*/
|
|
async create({}: HttpContext) {}
|
|
|
|
/**
|
|
* Handle form submission for the create action
|
|
*/
|
|
async store({ request }: HttpContext) {}
|
|
|
|
/**
|
|
* Show individual record
|
|
*/
|
|
async show({ params }: HttpContext) {}
|
|
|
|
/**
|
|
* Edit individual record
|
|
*/
|
|
async edit({ params }: HttpContext) {}
|
|
|
|
/**
|
|
* Handle form submission for the edit action
|
|
*/
|
|
async update({ params, request }: HttpContext) {}
|
|
|
|
/**
|
|
* Delete record
|
|
*/
|
|
async destroy({ params }: HttpContext) {}
|
|
}
|