folded-php / view Goto Github PK
View Code? Open in Web Editor NEWView utilities for your PHP web app.
Home Page: https://packagist.org/packages/folded/view
License: MIT License
View utilities for your PHP web app.
Home Page: https://packagist.org/packages/folded/view
License: MIT License
The package folded/exception as released version 0.3.
This package uses folded/exception 0.3.
This package uses folded/exception 0.1.
None.
To send emails, I would like to use Blade. Currently, displayView will not return the HTML content.
A new function to get the rendered, HTML content from a given view.
use function Folded\getRenderedView;
$html = getRenderedView("emails.account-created");
None.
None.
I am always passing the company name in each of the views that extends a base layout that displays this company name in the header.
I would prefer describing that this layout always need this company name, in order to free my other views from constantly adding this value.
To be able to pass data to a certain layout or view.
use function Folded\addDataToView;
use function Folded\getConfig; // composer require folded/config
addDataToView("layouts.base", [
"companyName" => getConfig("company.name"),
]);
I have to pass the company name in all of the views that extends my base layout.
Passing data in all of the views that extends my base layout.
The solution seen in Laracasts forum using classic Laravel View facade.
This package use an old version of folded/exception.
Upgrade to folded/exception:0.4.*
When the code loads functions, it should detect the existance of the function under the namespace instead of just the name of the function
The call of function_exists()
use the full qualified namespace.
namespace Folded;
if (!function_exists("Folded\theFunction")) {
// load the function now
}
Functions declared twice enters in collision.
None.
There is no templates for bugs and enhancements, which can reduce the chances someone will want to describe his issue or can make difficult to format and clarify an issue without proper templates.
For an enhancements, the following sections (using level 2 title, ##
) should be shown:
The text hints, using italic, should be shown below each of these titles (without the double quotes):
For a bug, the following sections (using level 2 title, ##
) should be shown:
The text hints, using italic, should be show below each of these titles (without the double quotes):
To write by hand the issue layout.
Currently we duplicate the route URL both in the addGetRoute()
method and in the view. A system associating a route with its name to be able to get the URL by the route name instead.
To be able to register an optional name for the route:
use function Folded\addGetRoute;
addGetRoute("/", function() {}, "home.index");
To be able to get an URL by the route name:
use function getRouteUrl;
echo getRouteUrl("home.index"); // string (1) "/"
No method to get an URL from the route name.
Duplicating the URLs in the routes registration file and the view.
Static analysis helps catching bugs earlier.
pest --coverage && phpstan analyse src
phpstan.neon
configuration fileNone.
None.
The view class is not meant to be extended. Mark it as final.
The View class is marked as final.
None.
None.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.