Level 40
How do i include/use, for example Carbon class inside helpers file?
How do i include/use, for example Carbon class inside helpers file?
Make sure you edit the correct composer file. With your IDE it's easy by mistake to open the frameworks composer file instead of the one belonging to your project.
when I did all this, I found something others:
<?php
namespace App\Http\Controllers;
use function App\Http\array_increase;
class SomeClass
{
function doSometime() {
...
$array = array_increase($array, 'image_url');
...
}
}
@mineass You need add a line use function App\Http\array_increase; in the file of your need use it
I just implemented @Bespired solution (1 page behind) and its working like a charm. But need more testing
Please or to participate in this conversation.