Yes, you can. because
Laravel 4 uses Composer to manage dependencies as the structure itself depends on the number of external packages to work properly. Each of the components used by Laravel 4 is individually available on the Illuminate GitHub Repository. Laravel 4 links Light components to create a frame.
So, for example, if you want to use the Illuminate Database component, you need to create a new instance of the "Capsule" manager. The capsule aims to simplify the configuration of the library for use outside the Laravel framework.
use Illuminate\Database\Capsule\Manager as Capsule; $capsule = new Capsule; $capsule->addConnection([ 'driver' => 'mysql', 'host' => 'localhost', 'database' => 'database', 'username' => 'root', 'password' => 'password', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', ]);
Once the Capsule instance has been registered. You can use it like this: (Using the query builder)
$users = Capsule::table('users')->where('votes', '>', 100)->get();
For a complete list of components, click here . You can also find information about the component on the Laravel website .
Update: Also make sure you have this on your server, because it requires Laravel-4 .
PHP >= 5.3.7 MCrypt PHP Extension
You can also take a look at Symfony Components , Laravel itself uses these components in its core components.
The alpha
source share