Collective\Annotations\Database\Eloquent\Annotations\Scanner::getModelDefinitions PHP Method

getModelDefinitions() public method

Convert the scanned annotations into route definitions.
public getModelDefinitions ( ) : string
return string
    public function getModelDefinitions()
    {
        $output = '';
        $reader = $this->getReader();
        foreach ($this->getClassesToScan() as $class) {
            $annotations = $reader->getClassAnnotations($class);
            if (count($annotations) > 0 && !$this->extendsEloquent($class)) {
                throw new InvalidBindingResolverException('Class [' . $class->name . '] is not a subclass of [Illuminate\\Database\\Eloquent\\Model].');
            }
            foreach ($annotations as $annotation) {
                $output .= $this->buildBinding($annotation->binding, $class->name);
            }
        }
        return trim($output);
    }