first commit
This commit is contained in:
43
app/controllers/sections_controller.ts
Normal file
43
app/controllers/sections_controller.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
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) {}
|
||||
}
|
||||
Reference in New Issue
Block a user