Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter4 Attribute Routes
#1

Hi, all.

I started to develop a package that you can set routes in your Controllers with PHP8 Attributes.

PHP Code:
namespace App\Controllers;

use 
Kenjis\CI4\AttributeRoutes\Route;

class 
News extends BaseController
{
    #[Route('news', methods: ['get'])]
    public function index()
    {
        ...
    }


This package generates Routes File from the Attribute Routes in your Controllers.
So, there is no extra overhead at runtime.

See https://github.com/kenjis/ci4-attribute-routes
Reply


Messages In This Thread
CodeIgniter4 Attribute Routes - by kenjis - 01-17-2022, 11:41 PM
RE: CodeIgniter4 Attribute Routes - by kenjis - 01-26-2022, 08:01 PM
RE: CodeIgniter4 Attribute Routes - by kenjis - 01-26-2022, 09:38 PM
RE: CodeIgniter4 Attribute Routes - by kenjis - 02-12-2022, 07:32 PM
RE: CodeIgniter4 Attribute Routes - by vyatka - 06-14-2022, 06:58 AM
RE: CodeIgniter4 Attribute Routes - by kenjis - 06-14-2022, 11:38 PM
RE: CodeIgniter4 Attribute Routes - by vyatka - 06-15-2022, 12:20 PM
RE: CodeIgniter4 Attribute Routes - by MGatner - 06-16-2022, 04:26 AM
RE: CodeIgniter4 Attribute Routes - by vyatka - 06-16-2022, 01:35 PM
RE: CodeIgniter4 Attribute Routes - by kenjis - 06-16-2022, 10:13 PM
RE: CodeIgniter4 Attribute Routes - by vyatka - 06-17-2022, 01:20 AM
RE: CodeIgniter4 Attribute Routes - by plaztic - 07-05-2022, 10:43 AM
RE: CodeIgniter4 Attribute Routes - by kenjis - 02-12-2023, 01:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB