PHPFile::make()->file('dummy.php')
PHPFile::make()->class(\App\Models\Car::class)
PHPFile::load('app/Models/User.php')
PHPFile::load(\App\Models\User::class)
PHPFile::fromString('<?php $hey = 1337;')
PHPFile::addMissingTags()->fromString('$hey = 1337')
$file->render()
Saves a file to disk
$file->save()
$file->save('app/helpers.php')
$file->className();
$file->className('NewName')
$file->classConstant('HOME')
$file->classConstant('HOME', '/new/home')
$file->remove()->classConstant('HOME')
$file->extends();
$file->extends(SomeBaseClass::class)
$file->implements();
$file->implements([SomeInterface::class])
$file->methodNames()
$file->namespace();
$file->namespace('New\Namespace')
$file->property('table');
$file->property('table', 'new_table');
$file->private()->property('table', 'secret');
$file->remove()->property('table');
$file->clear()->property('fillable');
$file->empty()->property('fillable');
$file->add('column')->to()->property('fillable');
$file->use()
$file->use([
Class1::class,
Class2::class,
])
$file->add()->use([
Extra1::class,
Extra2::class,
])