Does anyone know where the source code
is located for the built in Laravel 5 helper functions like view() and str_limit()? I am
curious to see how they are doing things in the background.
Tuesday 9 January 2018
Laravel 5 Helper functions
itemprop="text">
Answer
view function is located under
/vendor/laravel/framework/source/illuminate/Foundation/helpers.php
line
number 585
content is as
follows:
if ( !
function_exists('view'))
{
/**
* Get the evaluated view
contents for the given view.
*
* @param string
$view
* @param array $data
* @param array $mergeData
*
@return \Illuminate\View\View
*/
function view($view = null, $data
= array(), $mergeData = array())
{
$factory =
app('Illuminate\Contracts\View\Factory');
if
(func_num_args() === 0)
{
return $factory;
}
return $factory->make($view, $data,
$mergeData);
}
}
start
using an IDE like Php storm and you can find all this functions with a single click
Subscribe to:
Post Comments (Atom)
php - file_get_contents shows unexpected output while reading a file
I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...
-
I have an app which needs a login and a registration with SQLite. I have the database and a user can login and register. But i would like th...
-
I would like to use enhanced REP MOVSB (ERMSB) to get a high bandwidth for a custom memcpy . ERMSB was introduced with the Ivy Bridge micro...
-
According to my understanding, and my calculator, cos(90 degrees) equals 0 . In my code, I have a funct...
No comments:
Post a Comment