Skip to content

Changes between 2.x and 3.0 and TODO

Jorge Castro edited this page Jun 6, 2020 · 3 revisions

Changes between 2.x and 3.0

  • @defaultcase now is called @default (BladeOneLogic)
  • @break is now required for @switch/@case
  • BladeOneLogic is now merged with BladeOne. BladeOneLogic is discontinued.
  • New tags of security (optional).
  • New tags for injection

todo

  • @section / @show versus @endsection

  • hello@@world fails to render hello@world. However, hello @@world render hello@world.

  • extends bug. If you use extends then, every content after the last @endsetion will be rendered at the top of the page.
    Solution: avoid to add any content after the last @endsection, including spaces and empty lines.

Missing

Some features are missing because they are new, or they lack documentation or they are specific to Laravel (then, they are useless without it)

  • Laravel's own commands. Reason: This library is free of Laravel

  • View Creators are not defined.

  • Custom if. Reason: It is dangerous and odds. DONE

  • blade extension Reason: Extensions (that is part of the code, not in the template) is managed differently on BladeOne.

  • @php. Pending. I'm not so sure to implement this one. If you are using this one, then you are doing it wrong. DONE

  • @canany. Pending. 🐤 DONE

  • @can ( https://laravel.com/docs/5.6/authorization ). Pending DONE

  • @cannot. Pending DONE

  • @elseauth. Pending DONE

  • @elseguest. Pending DONE

  • @dump. Done. Ugly but it is done DONE

  • @elsecan. Pending DONE

  • @elsecanany. Pending 🐤 DONE

  • @elsecannot. Pending DONE

  • @endcanany. Pending 🐤 DONE

  • @endcannot. Pending DONE

  • @endunless. Pending DONE

  • @csrf. Pending DONE

  • @dd. Done. Ugly but it is done too. DONE

  • @method. Pending DONE

  • Comment with the name of the template folder. It is not done because it could break functionality. BladeOne allows to write and work even with non-html templates.

  • Some functionalities are not available for PHP lower than 7.0.

bad example:

@extends("_shared.htmltemplate")
@section("content")
@endsection
this is a bug

result:

this is a bug
<!DOCTYPE html>
<html>
   <head>....</head>
   <body>....</body>
</html>

bad too: (check the empty line at the bottom). This is not as bad but a small annoyance.

@endsection(line carriage)
(empty line)

good:

@endsection