1. Go to this page and download the library: Download proai/lumen-annotations library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
proai / lumen-annotations example snippets
namespace App\Http\Controllers;
use ProAI\Annotations\Annotations as Route;
/**
* Class annotation for UserController (belongs to all class methods).
*
* @Route\Controller(prefix="admin")
*/
class UserController
{
/**
* Method annotations for showProfile() method.
*
* @Route\Get("/profiles/{id}", as="profiles.show")
* @Route\Middleware("auth")
*/
public function showProfile()
{
return view('profile');
}
}
namespace App\Http\Controllers;
use ProAI\Annotations\Annotations as Route;
/**
* Class annotations for resource controller CommentController (belongs to all class methods).
*
* @Route\Controller
* @Route\Resource("comments", only={"create", "index", "show"})
* @Route\Middleware("auth")
*/
class CommentController
{
...
}
namespace App\Handlers\Events;
use ProAI\Annotations\Annotations\Hears;
/**
* Annotation for event binding.
*
* @Hears("UserWasRegistered")
*/
class SendWelcomeMail
{
...
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.