You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd love to be able to use this in a Symfony project. If you have the symfony CLI installed, here's a simple script to see the error. (I'm only putting the example in the controller to make it easier to see the error message). Since it's not lavarel, I also installed illuminate/support.
Thanks.
symfony new --webapp archetype-test &&cd archetype-test
composer install
composer require ajthinking/archetype illuminate/support
cat > src/Controller/AppController.php <<'END'<?phpnamespace App\Controller;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;use Archetype\Facades\PHPFile;class AppController extends AbstractController{ #[Route('/', name: 'app_homepage')] public function index() {// Create new class PHPFile::make()->class('App\\Entity\\Product') ->use('Shippable') ->public()->property('stock', -1) ->save(); }}END
symfony server:start -d
symfony open:local
The text was updated successfully, but these errors were encountered:
Hi, thanks for posting! Unfortunately Im not familiar with sympfony. There might be some issues that it depends on laravels app container, or other specifics.
Could you provide an example of how to set this up in lavarel? Or a demo repo with installation instructions?
It appears that you've done most of the hard work of integrating the php-nic library and generating the code, and the lavarel part is mostly a wrapper around those calls and loading the class. Although I'm not familiar with lavarel, if I had a working example I might be able to provide a similar wrapper but around Symfony.
I'd love to be able to use this in a Symfony project. If you have the symfony CLI installed, here's a simple script to see the error. (I'm only putting the example in the controller to make it easier to see the error message). Since it's not lavarel, I also installed illuminate/support.
Thanks.
The text was updated successfully, but these errors were encountered: