0

Where can I find the default blade directives folder? I was looking for the @forelse to take as example, but I couldn't find it.

Does anyone know where they are defined in Lumen/Laravel?

note: I'm using Lumen framework, but I think it's quite similar to Laravel in this question, so I'm tagging both.

EDIT:

Due to the imprecision, I'll explain better my intention.

Basically, I'm creating a directive exactly the same as @forelse, but with 2 or 3 further information. For that reason, I came to ask about the location since I haven't found by myself.

henriale
  • 1,012
  • 9
  • 21
  • 1
    Take a look at the [documentation](http://laravel.com/docs/5.1/blade), specifically the [Control Structures](http://laravel.com/docs/5.1/blade#control-structures) section. – Luís Cruz Sep 07 '15 at 13:58
  • Thanks for your comment, @milz! but I'm looking for where they are instanced. I improved my question to explain better. please, take a look – henriale Sep 07 '15 at 14:16
  • 1
    Not really sure what you're after. However, the class that defines the Blade Template is [BladeCompiler](http://laravel.com/api/5.1/Illuminate/View/Compilers/BladeCompiler.html) and you can check the file location through it's namespace. I believe you're trying to extend / add your own blade statements. If so, take a look at [this SO Q&A](http://stackoverflow.com/q/18329541/908174) – Luís Cruz Sep 07 '15 at 14:23

1 Answers1

0

They're defined in the Illuminate\View\Compilers namespace in the BladeCompiler.

See Illuminate/View/Compilers/BladeCompiler.php

Specifically you'll need the compileForelse method if that's the one you want as an example.

Ben Swinburne
  • 25,669
  • 10
  • 69
  • 108
  • I was looking exactly for that! unfortunately, it seems i little messy to implement :( But thanks anyway! – henriale Sep 07 '15 at 14:34