for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Prateekkarki\Laragen\Generators\Backend;
use Prateekkarki\Laragen\Generators\BaseGenerator;
use Prateekkarki\Laragen\Generators\GeneratorInterface;
class Request extends BaseGenerator implements GeneratorInterface
{
public function generate()
$controllerTemplate = $this->buildTemplate('Backend/Request', [
'{{modelName}}' => $this->module->getModelName(),
'{{authorization}}' => "true",
'{{rules}}' => $this->getRules()
]);
$fullFilePath = $this->getPath("app/Http/Requests/Backend/").$this->module->getModelName()."Request".".php";
file_put_contents($fullFilePath, $controllerTemplate);
return $fullFilePath;
}
protected function getRules(){
// Todo
return "";