Skip to content

Instantly share code, notes, and snippets.

@Marlysson
Last active Dec 5, 2019
Embed
What would you like to do?
ROUTES = [
RouteGroup([
Get('api/projects',"ProjectController@list").name('all'),
Post('api/projects',"ProjectController@create").name('create'),
Delete('api/projects',"ProjectController@delete").name("delete")
], name="project."),
RouteGroup([
Get('projects',"ClientController@index").name('all'),
], name="client.")
]
'''
ProjectController@list -> return Project.all() -> json data
ClientController@index -> return view.render('projects') -> return html page with vue code that request /api/projects
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment