Code Monkey home page Code Monkey logo

Comments (4)

philliphartin avatar philliphartin commented on September 15, 2024

I actually got it working with errors->all(). Is this how I should be accessing it? Seems a bit non-javascript

from laravel-pug.

weotch avatar weotch commented on September 15, 2024

Since you're still in PHP technically, I would expect to work with the php operator, like you discovered. But this is gonnna be the purview of https://github.com/pug-php/pug, we are a wrapper for that package.

from laravel-pug.

philliphartin avatar philliphartin commented on September 15, 2024

@weotch Makes sense. Thanks for your help!

from laravel-pug.

kylekatarnls avatar kylekatarnls commented on September 15, 2024

Hi @pjhartin We did some quick translate from JS syntax to PHP syntax. It's done by this engine: https://github.com/pug-php/js-phpize

In theory, your code with the dot should work. I tested with the following:
https://pug-demo.herokuapp.com/?embed&theme=xcode&border=silver&options-color=rgba(120,120,120,0.5)&engine=pug-php&input=doctype%20html%0Ahtml(lang%3D%22en%22)%0A%20%20body%0A%20%20%20%20each%20val%20in%20zone.getLocation()%0A%20%20%20%20%20%20p%3Dval%0A&vars=array(%0A%20%20%27zone%27%20%3D%3E%20new%20DateTimeZone(%22Europe%2FPrague%22)%2C%0A)

Each with the dot syntax seems to work in this example. Can you try to update to the last versions with composer update? (According to https://pug-demo.herokuapp.com/, it seems to work since the version 2.1.1)

from laravel-pug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.